Jazzy, I'm not an expert but know DIs use transformers to convert an unbal signal (as the line out from your pickups are) into a balanced one (as mic inputs on a desk need to be). This is made to match impedances between your bass and a console's mic input circuits, but also to prevent long cables from suffering with induced magnetic noises. There is no need to understand this in depth, though. The question is that they use transformers to do this "balancing act".
Active DIs have builtin preamps that help boosting weak signals (and that is why we don't need them with an active guitar's stronger output). To do so, those preamp need to be powered with batteries or any other external DC source, as console's +48V phantom power. This DC is what could be potentially harmfull to your bass, although a proper working tranformer should avoid any risk (since they isolates any electrical circuits attached to its both ends).
A transformer uses the magnetic field produced by a signal flowing through its primary coil (let's say input coil) to induce voltages in a secondary coil at its output. You may say the conection is magnetic, not electric, since this convertion only happens when currents change polarity. Audio signal (as your bass output) are AC by nature and can pass through a tranformer, but DC can't (this is a characteristic of inducers like coils and transformers).
So it should never permits any dangerous current to reach your bass circuit. If this happens is because there is something very wrong with DI's main component or the way it was conected, as far as I'm aware. Hope my bad english (and poor electronics knowledge) doesn't made that explanation useless...