Grains are cheap and energy dense, if your goal is to feed a large population it makes a lot of sense to put them at the base of the pyramid, that's what will keep you alive, as in, not starving. Higher up are fruits and vegetables, also cheap, they will provide with nutrients that you need to stay healthy on top of the calories that will keep you alive. Higher up are animal products, expensive but rich in proteins and a few other nutrients that are a bit lacking in the base layers, they help you get stronger and more performant in addition to healthy and alive. On top are pleasure foods, not really necessary for your body, but enjoyable.
I take it like a mirror of the "hierarchy of needs" pyramid rather than nutritional advice for people with effectively unlimited resources.