You'd think, considering the environment that they have found on Mars, all that exposed stuff would be more protected.
There's no water to rust connections and the atmospheric pressure is very low, so no large wind blown rocks to bang into cables. If a component needs temperature regulation or protection from the dust that will settle/get blown onto the vehicle, it'll be inside a box of some sort.
Opportunity was on Mars for
14 years and it died from lack of power during a severe dust storm that kept its solar panels from charging the internal batteries. Curiosity (and the 2020 rover) are nuclear decay powered, so that won't be an issue.