And yes painting and coating are needed in many cases to increase resistance to corrosion, dust, and other damage.
The problem is that planes millions of parts made of hundreds (thousands?) of different materials that each have different sensitivities to environmental factors. (chemicals, moisture, dust, etc) So the design of every manufacturing and maintenance process must take into account all of the materials and their particular sensitivities or else something BAD could happen.
One time I was involved with a project to create locking mechanism that was to be retrofitted to a system on a certain black aircraft. We had a problem in that the actuation forces for this mechanism tested a tiny bit higher than the specified values after exposure to dust.
It was still possible for groundcrew to operate the mechanism but it was out of the specs, so we suggested that groundcrew could just give it a shot of compressed air (which is a pretty common thing to have in a maintenance facility) to clear the dust and lower the actuation force. To our dismay, the groundcrew representative present explained that he could not do this because compressed air was not allowed anywhere near this aircraft, due to problems with low-observable coatings.