I've been doing audio installations (and their design), working as a mobile DJ and musical performances for over 30 yrs (first as a hobby, and then as a second income), and maybe my experience can be of some use to you here.
The main reason to use a DI box, at least a PASSIVE DI box, is to be able to run a
balanced signal. Having a balanced signal helps to cancel or eliminate hum. There is an influx of preamps that also serve as a DI box, but a preamp is NOT required in a DI Box.
I have several of the 'Pyle' brand DI box, which I bought from B&H Photo in NYC for $10 (& free shipping) that do the job perfectly. You do not need to spend lots of money. The same exact unit is rebadged as a Behringer and sold for $29 and rebadged and sold as Nady for $33. If you are going to spend ~$30, get the Behringer ADI-21, which is a preamp, eq, and DI box all in one and MANY folks here on UU will swear by this unit for those on a lower budget.
[WARNING WILL ROBINSON! - tech jargon ahead - Sorry
]
The point of a 'balanced' signal and the XLR cables are two-fold:
1) By converting from an 1/4" mono 'guitar cable' which has only a
single signal wire and a braided shield acting as a ground (typically referred to as UN-balanced signal) or
TS as in tip-shield, to an XLR cable, which has
TWO signal wires and a braided shield acting as a ground, the way it's wired at the mixer or PA is that the two signal wires are 180 degrees out of phase with each other, and the end result is that if there is a hum, typically from some kind of interference, it get eliminated or reduced due to what is called PHASE CANCELLATION, and where there was a hum (lets say of 60hz), there is now a 'NULL', and thus less or zero noise in the line. This BALANCED cable via the DI box also allows for much LONGER cable runs than and unbalanced cable. You can also get BALANCED cables that are in 1/4" connectors as in
TRS - meaning tip-ring-shield, but they are less common in true pro audio setups.
2) A DI-box that has a transformer inside it can do IMPEDANCE matching. This is important if the PA mixer is expecting a microphone signal (like a Shure SM58 or similar) which is typically around 600 ohms, and you want to feed it an instrument signal like a guitar/bass/ukulele/etc. Instrument outputs have a huge variance in their impedance but are typically near 1 mega-ohm (1 million ohms in this case). Why this is important is that you can use a Di-box with an instrument to convert/match the impedance to what you are plugging it in to, like a mixer or preamp. Impedance matching DI boxes can be either passive or active, as well as part of a preamp.
The Pyle DI-box that I mentioned above not only has the unbalanced-to-balanced conversion function, but also a 'ground-lift' as well as a 3-level signal attenuator, which lets you adjust the output impedance to match your mixer/etc, and it required NO batteries at all.
Another thing to mention is that withou using a Di box, you may have a much thinner sound and one that lacks midrange and bass frequencies due to an impedance mismatch, i.e. mic input on mixer, but feeding it with an instrument, or that the sound going into the mixer will have a very low volume level, and you need to crank up both the TRIM knob as well as the volume fader way up (near 8-10) to be able to get a reasonable level out of the mixer to the amp and then the speakers. These are both symptoms of an impedance mismatch.
Also, if you use a preamp that has a DI XLR output, you also typically get some eq controls and/or a gain or boost control to help tailor your sound from the stage at your feet, as well as whatever the 'sound guy' does at his 'FOH' (front of house) mixer.
I should also mention that most, if not all DI boxes have a 'parallel output' as a 1/4" connector, which lets you route the unmolested signal to either a stage monitor or amplifier that you can control in order to hear yourself, regardless of what the sound guy does with his mix to the PA system.
If you buy a DI box, you might want to also get another 10-15" 'guitar cable' for your parallel output, as well as a 25" male-to-female XLR 'mic cable', that way you are prepared to connect up to anything at all.
Hope this helps!