Possible Answers:
The camera is mounted just under the landers top surface, and obviously was exposed to a large amount of fine debriedebris being blasted about upon landing. The cover I believe is a heat triggered spring loaded cap. Now as to why it failed to keep the dust out requires access to greater knowledge of the camera and cover design; such as was it pressure sealed, what the pressure was in the space between the cap and camera lenselens, if not a vacuum what gas was in between the cap and lenselens, etc.. I suspect if the pressure was less than that on mars then when the cap opened the dust might have been drawn towards the lenselens.
The basic design I have looked at suggests the dust from the cap might be flung back up onto the camera lenselens from behind as the cap flips open under the camera.
There might have been a static effect on the lenselens that attracted the particles as well.
And finally if the surface contains frozen ice partclesparticles that melted due to the thrusters then this may have condensed on the lenselens to some degree and when the cap opened the dust may have stuck to this moisture (although I doubt this would be the case days later in the low pressure of mars).
Corrected misspelling of lens and particle