Curiosity celebrated it's first birthday by playing, on Mars, Happy Birthday. How was this accomplished, and why would this capability even be included on Mars?
the rover’s sample analysis unit vibrates at different frequencies to move soil samples. Normally, those vibrations sound remarkably like the noises robots make in Disney’s Wall-E, but when you string them all together, something similar to “Happy Birthday” results.
Curiosity does not have speakers. As the OP's linked article states:
This was accomplished using Curiosity's Sample Analysis at Mars (SAM) instrument. It "sang" the song by vibrating at different frequencies.
More information on how this was accomplished is available in this LA Times article:
The Sample Analysis at Mars instrument, or SAM, isn't a musical instrument. It doesn't have keys or strings. It's part of the lab in the rover's belly that analyzes rock samples and helped discover a habitable environment on Mars -- a place where microbes could have hypothetically lived in the past.
But SAM does make noise. In order to shake powdery rock samples so that they settle down, the instrument vibrates at various frequencies, Florence Tan, SAM’s lead electrical engineer, said in a video.
These frequencies can be used as musical notes. And by making SAM shake faster and slower, the team was able to tap out a little birthday tune for the rover on Monday. (They went with Aug. 5 because Curiosity landed around 10:30 p.m. Pacific time on that date.)