I think it's mainly the lime in concrete. Lime is a base (opposite of acid) and bases attack metals like aluminum and magnesium, especially in the presence of an electrolyte (water/moisture in concrete, dew, etc.), and especially where there are dissimilar metals (like aluminum/magnesium and steel) both in contact with that electrolyte ... some of it is likely caused by galvanic corrosion, the same thing that makes batteries work, and that makes zinc anodes on outboard motors get eaten away before the aluminum gets eaten away.
I've found modern pennies (copper over a core of zinc) lying in saltwater where they were almost paper-thin -- the zinc got eaten away by the copper. All you need for that to happen is for there to be a tiny nick in the copper cladding so that both the zinc and copper are in contact with the electrolyte (saltwater), and then it's just a matter of time before all the zinc disappears and all that is left is the copper. The farther apart the two metals are on the "galvanic series" (linked below), the faster this will happen, and the greater the voltage differential will be between the two metals as they corrode. Magnesium is more anodic (or less noble) than any other metal on the galvanic series, which is why the sacrificial anodes mounted on outboard motors used in freshwater are made of magnesium, or an alloy of it. (Zinc anodes are used on boats in saltwater because they last longer. If you used a magnesium anode on a saltwater motor, you could almost watch it melt away like a Popsickle.)
https://www.corrosionpedia.com/images/uploads/galvanic series noble metals.jpg