It's also that in the past not every member of the household worked. You can save money by baking your own bread but it takes time people don't always have.
It depends on what you're baking at home. You can make a very basic bread from flour, salt, water and yeast. Sourdough can be even cheaper because you can perpetuate the starter and not really need to buy yeast. The cheapest sourdough recipe costs about 2.8 cents an ounce to make and cheapo walmart bread costs 6.6 cents an ounce. If you make something fancier you could probably save more over the equivalent store bought BUT it takes a lot more time and work to do that. You are effectively trading your time for extra control over your food and potentially, spending less money on the ingredients than it would have cost to buy an equivalent.
Weren’t bread machines all the rage because you just dump in the ingredients and it’s autopilot from there? I see a lot of them at 2nd markets and in dumpsters, so I wonder if their usefulness was overestimated.