I think P-basses have a couple things going for them.
1) Pickup design and placement
It's hum-cancelling, which is nice, and the wider/fatter shape picks up more of the string length. It's location is also in a good spot tonally I think.
There are certain harmonics you can't pick up with pickups placed in certain spots due to the amplitude of that harmonic at that location. For example, a strat neck pickup can't pick up the 4th harmonic with the open strings because the amplitude of the 4th harmonic is zero at that exact spot. On a 51' P bass, that single coil pickup can't detect certain harmonics as well (I think the 4th again). The modern P pickup is moved a bit south towards the bridge, and is a much wider pickup so it's sensing more length of string.
It's also an offset design so you get a slightly different tone out of each set of strings, E/A and D/G respectively which I personally think helps thicken up chords and octaves to some small degree. Figure if you couldn't get a 4th harmonic for a particular note on the D or G string, you likely could on the E or A. You got options.
As you fret you change the location of these anti-nodes (where a harmonic amplitude is zero) but I still think the wider aperture and where the P-pickup is located allows you to get a thicker tone I think. The pickup shape also has an effect on the capacitance and inductance within the pickup, bleeding off some highs and moving the resonant peak back a bit for that classic P-bass upper mid bump.
For whatever reason the P-pickup produces a well rounded bass tone that seems to slot right in to the mix well. It works especially well in thick mixes I think. If you have a bunch of guitars and keys competing for the top-end spots you stay out of the fight and fit right in the low-end with a little upper mid bump for cut as needed.
2) Minimalism
One volume, one tone. Sometimes it's nice to forget about dialing in your tone and just play. Avoids analysis paralysis.
3) Comfort (Subjective)
The thicker neck and the P body shape seem to work well for a lot of people.
===================================================================
Regarding the aperture and pickup location affect on tone, check these out.
You can see guitar pickup response using this applet :
Guitar Pickup Response Demonstration
Or read more here :
Response Effects of Guitar Pickup Position and Width