From my experience, it's more about culture and expectations than anything. You'll occasionally get a shop that can stand above its city, but eventually it'll regress to the mean. Here in the PNW you can walk into any coffee shop and get a good coffee about 50–75% of the time. In NYC, I'd say it's more like 10%. I think it's because people in NYC don't value coffee very much, or care only superficially. On the flipside, even shitty bagels in NYC are better than most of what you can get here. I hated all the coffee I had in France, but it might be because they prefer a bitter cup to be drunk with sugar, rather than the black coffee we drink in the US.