We don't put all our coal and gas plants out in the desert, they're next to and within our cities.
Physically transporting electricity across distance is very expensive and a not-insignificant amount of power is simply lost on the way. These problems only get worse as the amount of power goes up, and the danger grows very quickly as power goes up. Plus the strategic and logistical benefits of distributed generation.
Simply put you can't centralize generation for the entire country. There's no practical way to actually transport that much power. Not with the technology we have today. If we had high-temperature superconductors then it would make more sense. But with standard metal wires, it's not happening.
> Simply put you can't centralize generation for the entire country.
Depends on the country.
In Washington state, our power sources are not next to our population centers; in fact many are in the center of our state! And our state would be the 87th-biggest-country out of 197 in the world.
USA averages 6% transmission loss. New long-distance transmission lines are HVDC and have far less loss over distance. But people oppose them for dumb and good reasons; why would I in Washington state want to have good connections to California so the local producers can reduce supply and drive up prices?
In the GB (UK mainland) grid only ~2% of energy is lost in transmission; distribution is more typically ~5%. And we did put most of our big thermal power generation in the middle of the country, which is now causing difficulties as we need to re-jig transmission to accept offshore wind and interconnectors.
Solar PV on rooftops is great, injecting power directly at the load, eliminating transmission and distribution losses until there is excess to spill back to grid. It would be helpful if we stopped running an entirely artificial timetable in winter that demands heavy activity well outside daylight hours, so that demand better matched availability.