Short answer: It's a holdover from the Warez scene, and more specifically around the time of the Commodore Amiga when pirates had ready access to music software.
Back in the day (and less often nowadays), pirates "signed" cracked software with their name or emblem or something to that effect. As more and more pirates entered the scene and piracy became more difficult, a cracker's signature became a source of pride and a show of the owner's technical prowess, as well as a show of professional superiority over other crackers. Think, for example, the needlessly flashy company logos at the beginning of movies or games.
When the Amiga raised the general bar on the graphics and sound capabilities of the home PC, cracktros started becoming art pieces in their own right. Your average pirate now had access to music, dynamic color, layering, and composing tools that didn't exist one generation before. In the spirit of competition between pirates, flashy intros and elaborate music that stressed the technical prowess of the machine and the cracker became a must for cracked software, keygens included. Some famous examples of these "demos" pushed to incredible degrees is Megademo and State of the Art.
Nowadays, some kind of cute intro is often included in modern keygens, although it's less about technical prowess and more of a throwback.