I am not an expect on the distribution of bakery products. However, I think these bakery’s were scattered all around the country so that they could ship competitively to all markets. I do not think you could have a bakery in just Texas, Utah, AL and be competitive to WA, ME and IL. Unless that is you are willing to give up 50% of the US market.
You still have to get raw materials to the factory.
Regardless of where it is.
There is an advantage on some products due to shelf life. This mainly effected the wonder bread etc...
Most of the sweets certainly can be centrally manufactured. No need to have all of these factories.