Is it really that baffling? People expect their bread to last more than two days, and it has to stay on the supermarket shelves longer than that. Of course you can cook your own bread and eat it quickly, but it's not very practical for a lot of people.
Bakeries are solved tech and work pretty well. The lazy even have a legion of delivery drivers to deliver it fresh now, too!