
These shops in Brussels (top), Leiden (middle) and Amsterdam (etc) are all about 3 feet deep, and built up against the wall of a church- which presumably gets rent. I've never seen it outside the low countries, but since it's across both Catholic and Protestant lands, and seems to date from the 16-1700s, I guess it's more a local custom than anything else.

But, then, I haven't checked or anything.
There's also clearly been no preservation society that decided that the stores must go, and the church stay, and that's probably the more likely reason for the difference. St. Paul's Churchyard used to be full of bookshops, if I remember.