Computers back in the day used to be shipped with something called PC Internal Speakers which was mainly used by the BIOS and sometimes old software, today motherboards still have a port for them but you have to buy one now instead of getting it for free. i got mine from my old Pentium 4 PC when i was cleaning stuff i used it on my newer motherboard to see if still works and it did! but only when i turned on the PC not when i logged in to Windows.
more