Note also that food levels of magnesium are estimated to have declined by up to 80% in the past century (possibly due to more intensive farming with modern fertilizers). So magnesium deficiency is also likely more widespread now than historically.
Nutrient measurements like the NCC are recent and show that foods that are good sources of magnesium, like those listed, have more than enough to make it trivial to hit daily recommendations.
In the USA - the Bread and Flour Regulations of 1998 require white and brown flours to contain calcium, iron, thiamin, and niacin.
Refined wheat flour is fortified with thiamin (vitamin B1), riboflavin (B2), niacin (B3), folic acid (B9), and iron. Vitamin B6, pantothenic acid, magnesium, and calcium may also be added, but this is voluntary.
Interesting. Where I live (Norway) it’s pretty much opposite: There’s no mandatory fortification of any foods, and only highly processed foods are sometimes voluntarily fortified by the producer. There are strict legal limits on how much you can fortify any foods here, as the health authorities are concerned of e.g. vitamin overdoses or sensitivities.
Instead of fortification they recommend supplements to those who need it. You are allowed to add a certain level of e.g. magnesium according to these regulations but I’ve only seen it added to energy drinks in practice.