What could cause corrosion in a water heater?
The long copper pipe, is that the discharge pipe? If moisture collects at the end of it, it can become acidic and cause corrosion. You may want to test the acidity of your water, but in general discharge pipe corrosion is not too much of a concern.

The other pipes, however, seem to be suffering from galvanic corrosion which occurs when you have different metals connected to each other. Normally this is prevented by installing a plastic insert between the two metals so they do not contact each other. You may want to do this the next time the water heater is replaced.