Why have my crank arms started corroding?
Why have my crank arms started corroding?

In the content of the post concern about corrosion between the pedal and crank is discussed.
Summary: The crank arm has been abraded allowing the aluminum to corrode (oxidize). The pedal and crank connection is corroding due to exposure to water or a water/salt combination.

The issue in the orange circle is abrasion followed by corrosion.
Something has abraded the black coating off of that area of the crank, exposing it to air and allowing aluminum oxide to form. In aluminum - as Criggie says in the comments - the oxidation forms a protective coating and does not eat into the metal over time like iron oxide, rust.
Causes for the abrasion seem to be identified in the comments as road grit. Something is rubbing on that spot.
The corrosion is natural for aluminum exposed to the air.
You could

lightly sand the abraded area, removing the corrosion and any paint that is not adhering to the crank arm
Tape off the rest of the crank arm
Use an appropriate paint to cover the area

The issue in the red circle is corrosion between the pedal and the crank arm. Pedal axles are made of steel, the crank is aluminum and they will seize up if something isn't done.
During assembly the pedal threads should have been lightly greased to prevent seizing.
It would be best to:

Remove the pedal
Clean the pedal - use a wire brush or steel wool on the rusted surfaces
Clean the crank arm
Put a light coating of grease on the threads
Reinstall the pedal.

The cause of the pedal to crank arm corrosion is exposure to water. Water is a solvent.

We need to take the statement &quot;Water is the universal solvent&quot; with a grain of salt (pun intended). Of course it cannot dissolve everything, but it does dissolve more substances than any other liquid, so the term fits pretty well. Water's solvent properties affect all life on Earth, so water is universally important to all of us.
www.usgs.gov - Water, the Universal Solvent

Water and salt is especially deadly.

The galvanic corrosion of aluminum is usually mild, except in highly conductive media such as slated slush from road deicing salts, sea water and other salty electrolytes. The contact area must be wetted by an aqueous liquid or humidity in order to ensure ionic conduction.
Fixing Corrosion Between Anodized Aluminum and Steel

Bikes can get wet but should not be left wet. A wet bike needs to be able to dry out or to be dried off.