According to Wikipedia:
A PC speaker is a loudspeaker built into some IBM PC compatible computers. The first IBM Personal Computer, model 5150, employed a standard 2.25 inch magnetic driven (dynamic) speaker.[1] More recent computers use a piezoelectric speaker instead.[2]
So that’s probably it. The PS/2 must’ve had a regular dynamic speaker, possibly the exact same model as those earlier IBM PCs, while (my) later computers had a piezoelectric speaker. And perhaps the Pentium 100 had a worse dynamic speaker or a better piezoelectric one? It definitely sounded better than the Pentium 3, if still a lot worse than the PS/2.
Incidentally, that source [1]
there doesn’t support that “2.25 inch magnetic driven speaker” thing at all. It just says “built-in speaker”…