As others pointed out, I think this is part of it. It has fewer strings, so perhaps some of it is that the guitar has 50% more strings so it must be 50% harder. By that logic, piano must be 14-15x harder than guitar. Also, I’ve seen 6 and even 7 string basses (and, for that matter, a 9 string guitar). Hell, I’ve seen plenty of guitarists get 7+ string guitars, tune to drop D (or God forbid something like drop B) and just play the lowest string or two. When they do that, they’ve basically turned the guitar into a bass.
I think part of this is cultural (to the music we’re exposed to) too. After all, rock, metal, etc is “guitar” music, so we just sort of assume that the most talented musicians are the ones that are front and center. It’s not unlike sports, like football for instance, where a more casual fan sort of assumes that the skill positions are the most talented players on the team, and sometimes that’s true, but plenty of times it’s not.
It certainly gets top billing in many rock bands. I also think that, again, the culture plays a part in that, that people who are the types who are interested in being flashy and getting attention are more likely to play guitar or be primary vocalists, again, not unlike how positions like wide receiver tend to self-select for a certain personality type. And those who are less interested in that may be more interested in another instrument.
Speaking for myself as a musician, despite that the guitar just doesn’t speak to me the way piano does, I do love the sound and greatly appreciate guitarists, but certainly the idea of at some point playing in a band, being the front man is a turn off.
It seems to me that there’s sort of two theories about how bass works. Either it’s more or less part of the rhythm section, that it’s intended to give more gravitas to the beats or depth to the overall sound, but they’re not really instruments for carrying the primary melody or for a solo or what-have-you. Then there’s the other mentality that they’re just as much an instrument and integral to the sound as the guitar, vocals, keyboards, or whatever other instruments they’re playing with. Unfortunately, that latter mentality seems uncommon in unless the band happens to have a killer bassist (not unlike bands that only have prominent drums if they have a killer drummer), but I’ve heard and seen perform plenty of bands that have pretty solid talent through all the members, and they’ll make a point of writing so that all the members of the band get a chance to shine.
In my view, it really should be about what fits the music that is being written and the talent of those involved. I can really dig on some really awesome bass grooves as parts of songs, but I wouldn’t want to be in a band that focuses only on that sound.