Now that I find out that the main reason for using a 2 MP camera is because that's what the specifications were in 2004, I'm a lot more disappointed than if it was just about the speed of transfer between Mars and Earth. 2 MP cameras were in high-end phones in 2004, but you'd expect NASA to use something a little more advanced than what was available in phones in 2004. How much more would it have cost them to use a 5…
If the sensor on a Mars rover fails there are thousands and thousands of dollars of wasted opportunity.
Thus, they pick something reliable that they know, and test the hell out of it, and fix the spec.
This has pros and cons.
Pros include a well known set of kit with extensive testing and documentation.
Cons include being locked into a manufacturers product line. If that product goes obsolete you're stuck searching for stock of product in various resellers inventory. I guess NASA can just buy extra stock. But I've seen the result of odd devices being used on aerospace kit, and it becomes impossible to create a sensible quote. Subcontractor A puts a request in for obsolete part, and that goes to a bunch of vendors. Subcontractor B puts the same request in, and so you end up in a bidding war for parts that you might not buy. Given that yo're quoting on something that you'll be building in maybe three months there's no chance of providing an accurate quote.
tl:dr when designing a Mars rover use components that you know and buy lots of them. When designing an aircraft avoid anything that is listed near end of life, and try to pick something that's not going to go obsolete in 3 years, and try to find something that can have alternatives.