The function of the EDL microphone was obviously to record the sounds of the landing but they weren't sure it would survive the landing:
QUOTE
We may hear the friction of the atmosphere, the winds, and the sounds of dust displaced as the rover lands. It is unlikely it will work beyond landing. If it does survive, we may be able to hear the sounds of the Martian winds and sounds of the working rover, such as the wheels turning, or the motors that turn its head, and the heat pumps that keep it warm.
SourceSo, the EDL microphone was repurposed for surface operations.
For for the sake of completeness, the SuperCam Microphone is located here:
Click to view attachmentIt is usually used in conjunction with SuperCam laser, and the sound of the laser hitting the rock can also give clues as to the composition of the rock. I would assume the rover is stationary when using the laser, so that's why the laser sound is cleaner.
This PowerPoint presentation has a short history of planetary microphones, more information about the SuperCam microphone and the acoustics on Mars:
The Mars Microphone onboard Supercam for the Mars 2020 roverWhen you consider Mars has only 1% of the air density compared to Earth, and is 95% carbon dioxide, it's pretty amazing we can still hear things.