Just to give a little perspective here.
I dug out my Encylopedia Magica books - I have all 4. These are the pretty thorough listings of all magic items published up to 1994 (well, probably 1993). They're wonderful books and I love them to pieces.
Polearms - as a section- include AFAIK, every single polearm, trident, bident, whatnot, published for D&D to that date. 7 pages. 840-847 (and that includes one full page art spread). Spears cover a whopping 4 pages (pages 1128-1132) Swords start on page 1335 and run to page 1415. Eighty PAGES of nothing but magic swords.
IOW, there's probably more published magic swords in the Encyclopedia Magica than all other weapons combined.
Tell me again how swords aren't given the prime seat at the table.
Of course most of those were never on the DMG treasure table, and you'd need the entire EM to even think about using it to randomly generate treasure.
Like, don't get me wrong, I know full well that you shouldn't really randomly roll treasure- the DM should always be ready to chuck or alter the results if it would lead to something problematic for the game. But the treasure tables in the DMG were weighted to give some things (like swords) preference over other things, and some people took that as an insinuation for what the game should be like.
But then you have published adventures. These clearly did
not follow the DMG guidelines, given the sheer amount of
rings of protection and
swords +1 that littered them, but again, it was rare to encounter a +1 pike or jo stick in such. And not every DM had the wherewithal to change the treasure in adventures, because they were never told to do so outright.
What, exactly, the intended distribution of magic weapons were is basically unknown. The DMG tables were apparently weighted to provide loot that would favor some classes over others, and you could infer some things from that. Or not. The fact that certain weapon types were more prominent in published adventures could simply be a self-fulfilling prophecy- many people chose to use swords, so writers made sure to place more swords than other, less common weapons, which wouldn't be used as much.
White Plume Mountain was an adventure written with the idea that the players return the lost weapons to their owners, and so one could assume the weapon types were chosen because bastard swords and tridents were less commonly used weapons. Whelm is an interesting case, as warhammers blatantly sucked in AD&D, but I've seen people use them, plus, as Snarf would tell you, the most powerful (potentially) weapon in the game was a warhammer (the
hammer of thunderbolts) so make of that what you will (though there are additional factors, like Wave requiring you to worship Poseidon and Whelm wanting you to be a Dwarf).
I have, however, heard several DM's online who will happily say that if you choose an unusual weapon, good luck finding a magic one, because they won't change their world to have you find one. What the intended game loop was and what it ended up being is difficult to talk about, since every game is different.
We can point to published materials and say there was a bias, but whether or not that really mattered had more to do with the individual DM's than anything else. I will reiterate though, that the game doesn't ever explicitly tell a new DM to make sure players have a +1 weapon by level 3 or anything along those lines (and, in fact, whenever D&D has come out and said things like that, it got a lot of pushback from DM's who didn't like the idea of players being "entitled" to treasure*), so what actually happened in the wild is pretty much unknown.
*After all, if players were "meant" to have the ability to fight monsters immune to normal weapons or have a given AC by a certain level, the designers should probably just hard code these things into the classes, rather than expect the DM to tailor treasure parcels to patch their game for them, lol. Then again, some people would never be happy. If 6e comes out and says "4th level Fighters treat all their weapons as if magical", I'm sure there'd be complaints about Fighters becoming "magical"...).