It's easy to blame relatively limited opening hours, but if there's inadequate demand for longer hours, then it's not feasible to be loss making just for the convenience of the odd customer.
We had a typical "corner" newsagents in the 70s, 80s and 90s. We opened 7 days from 6am to 6pm, except Sundays where we closed at 1pm. That was very hard work as we didn't have staff, just immediate family to run it. We never closed for holidays (didn't have them) and basically only closed Xmas Day (or other days when papers weren't printed, I can't remember exactly, but I think there used to be no papers New Years Day and maybe not Easter Monday either), but we were open at least 360 days per year, if not 364 in latter years!
People still complained we didn't open soon enough for the shift workers who started earlier, or not later enough for those wanting to buy things in the evening or Sunday afternoons etc. Some even complained when they found us closed on Xmas day and they'd run out of fizzy drinks or batteries!
We trialled Sunday afternoons for a full Summer - around 3 months. We knew you can't do it for the odd few times, so we made a big thing of it - posters on the windows, consistently opened every Sunday afternoon. We got virtually no extra business at all. Yes, people came in, but they'd just pay their papers or buy a card etc - the thing they used to do on different days, so no "extra" sales, just displacement of existing business. Average weekly total sales were exactly the same. So we stopped doing it, and people went back to coming in on the other days as previously.
When the national lottery came along, we had to open later on Saturdays as part of the licencing agreement, so we opened until 8pm. Complete waste of time again - same thing happened. People who'd previously "rush" in on Saturday afternoon before we closed for their paper and packet of cigs would more leisurely stroll in between 6 and 8pm to buy them.
Reality is that no small independent business can open the same kind of hours of the national huge franchise chains. Everyone says they want longer opening hours, but in reality, they continue to use the chains, supermarkets etc., and just want the "small shop" for their occasional convenience.
Opening longer hours costs money in terms of wages, utilities, etc., and unless enough customers spend enough in those extra hours, the business simply can't run at a loss for the extra hours.
Yes, I've not doubt at all that "some" are little more than lifestyle businesses operating stupidly restricted hours, but places like cafes and small bakery/sandwich shops have high overheads and can only justify opening when it's busy enough to make profit, which is basically the breakfast/lunch peaks. That's why so many of them close at 2 or 3 in the afternoon - the trade just isn't there to warrant the wages and power for a handful of customers for another few hours.