The hardware controlling the PC speaker was only designed for playing a single tone at a time. But there was software that could do something like PWM and get much better quality. Linux still has a snd_pcsp module for this.