I think the studies are looking at this backwards. Physical activity should probably be looked at as the natural state of humans and ask why lack of physical activity affects the brain.
Then it probably makes a lot more sense, the brain is comprised of cells, just like muscles, that are either anabolic or catabolic. A lack of physical exercise is going to put all cells, including brain cells, in a catabolic state the same as muscle atrophy will waste away muscles due to lack of physical activity.
Cells are cells, they are where energy is made, they are binary only existing in anabolic or catabolic states and never simultaneously existing in both states. Lack of exercise put the cells in catabolic states and long term catabolic states lead to metabolic/energy production problems in the cells. So naturally if you consider lack of exercise as the natural state of humans, sure it will appear physical activity improve brain function.