There are two different questions being asked and answered here.
OP's question is "What causes a new string to be dead right out of the envelope, or on a new bass?"
The answer to this is almost always "The wrap is not perfectly tight around the core, leading to a loss of energy when plucked...a loss that is most obvious at higher frequencies."
(Ideally, a string is a solid mass of exactly uniform thickness that is also perfectly flexible. If the mass isn't solid -- if any part of it can move or rattle -- the vibrating string loses energy to itself, instead of just to the air and the bass, and the string sounds "dead".)
It is most common for the low B and low E strings to be dead right out of the package, because they usually have three layers of wrap wire around the core. The A and D strings usually have two wraps, and the G string usually has only one. (Guitar strings have either one or zero wraps.) The more wrap layers there are, the more opportunities for one of them to be loose or come loose, resulting in a dead string.
Wrap wires can come loose either because they weren't perfectly wound at the factory (e.g. uneven tension or uneven feed), because the bass was strung up improperly (e.g. failing to crimp the end of round-core strings), or because the bridge has too high a break angle and the wraps can't cope with the bend.
Again, the more wraps, the more likely these are to happen...which is why, if a string is dead out of the package, it's almost always the low B or low E.
The second question is "What causes otherwise good strings to die over time?"
That's mostly just oil and sweat and dead skin and crap getting stuck in the windings and damping the high frequencies. (This is also why boiling old strings improves their tone.) But there is also potentially some degree of fatigue and deterioration over time, which can manifest itself as wrap wires no longer being perfectly solidly attached to the core or each other, or by breaking entirely, usually at the break over the bridge saddle.