When I bought my bass, it was a very cheap, poor quality instrument and the electronics were terrible...they sounded like a cardboard box. Under my guitarist's guidance, since I didn't know anything at the time, I got and installed a Dimarzio Model P and it worked for me for a long time. Eventually, I became discontent with the tone and started seeking a different sound, at which point I switched to a Lollar pickup. It made a ton of difference and I'm happy with the choice.
In short, people mod because they're looking for something different than what they have, and often to upgrade poor quality components, as well.
Same reason for me. I bought a Univox Ric clone bass as a teenager when I wanted to start playing bass. I wanted a Ric but the Univox was a fraction of the price and I was a cash-strapped teen. The stock pickups were thin and crappy sounding, so I replaced the bridge pickup with a Dimarzio P-bass pickup. This made it sound MUCH better, although it sounds nothing like a Ric. I have never had a reason to mod any of my other basses once I gained experience and knew more about what I was looking for.