True story, back in the cave person days, when television only came over the air waves and if you wanted to "own" a computer you shelled out anywhere from $500 to $5000 for something with an 8 bit processor that ran between 1 and 4 MHz and had, usually, much less than 65,536 bytes of RAM, peripherals for these things were few and far between. A couple of serial ports and a couple of parallel ports was considered a "lot" of I/O. You might have stored your programs on an 8" or 5" floppy disk, but if it was before 1978 you most likely stored programs on cassette tape. Anyway ...
One of the things you could always count on was that these things radiated all sorts of spurious energy and being relatively low frequency beasts to begin with, finding a harmonic that you could pick up with an AM radio held "near" (where near could be 1' to 10' (.3 - 3m)) that interference and with the judicious use of delay loops cause that interference to modulate to "tones" and thus create recognizable "music."
As a kid in high school with just such a computer I can tell you that "playing music" (no matter how poorly) on a nearby AM radio was orders of magnitude more impressive than pointing out by the pattern of lit and unlit LEDs that your amazing machine had just calculated a logarithm. (even though the latter was significantly more difficult from a programming perspective!) Once I got a printer, being able to print out NSFW pictures was a neat trick but for crowd appeal and cheap accessories, music over an AM radio was still the top demo of the time :-)