There's a lot of overhead in a sandwich shop hiring a baker, then outfitting a kitchen to efficiently bake bread at scale. And how do you handle his days off, with n=1 baker?
Vs. a bakery only needs 4' of counter space to do a modest volume of basic (cold cuts & such) sandwiches. Unless it's a pretty upscale bakery, the customers will be fine with less-than-fancy sandwiches at less-than-fancy prices - those are mainly a "while I'm here" convenience. Vs. a "great sandwich" shop has to qualify as a destination.