It comes from your system's internal speaker. Most systems no longer have these, and few are kind enough to redirect it to your actual speakers.
I used to have a computer that still had an internal speaker, and via system calls you could play simple music on it (you could only specify a frequency and a duration).