After the Barkeep's player piano was destroyed in a blob infestation, he bought a new player piano which had just enough artificial intelligence to play a some songs by itself. Without the Barkeep's knowledge, it was also just smart enough to form emotions and gain sentience. The Piano fell in love with The Saloon Doors, the AI of the Space Saloon.
The Saloon Doors, however was already in love with Croach the Tracker. The Piano, wanting The Saloon Doors to be happy, emitted a radiation which caused "mass musicality". That is, it caused everyone to occasionally break out into song.
When Croach the Tracker declared his onus to Sparks Nevada was complete and said he was returning to his tribe, he had no final words for The Saloon Doors and broke her heart, as he did not realize she had feelings for him. Seeing the Saloon Doors heartbroken caused The Piano to reveal his sentience and his plan. Although The Saloon Doors didn't love him, she understood true love. The Piano decided that humanity was a virus and would be exterminated, and also Croach for more personal reasons.
His first attempt at exterminating humanity was mostly just piano playing, so Sparks Nevada shot and killed the Piano before he could attempt to kill everyone again. The Saloon Doors was so angered by her rejection from Croach and the Piano's death that she grew arms and legs and left Mars.