There’s a great recurring joke in Phoebe Waller-Bridge’s comedy Fleabag. The lead character, played by the writer herself, scratches a living by running a cafe, but doesn’t quite seem to know what she’s doing. Consequently, whenever a customer asks her for, say, a cup of coffee and a panini, she’ll blurt out the first ridiculous figure that pops into her head (“Twenty pounds, please”). These prices get increasingly outlandish as the show goes on, yet each time, the customer will hiss something like “Bloody London”, and pay up.

The reason this joke works, I think, is because this is what living in London is genuinely like. Prices are so ridiculous that it can feel as if there are magnets at the door of each shop, ready to drain all the change from your pockets and wipe your debit card to boot. Spending £20 on a coffee and a sandwich is still at the upper end, sure; but there are definitely places where you can blow £10 without buying anything particularly exotic.

What’s more, the days when we’d still fret about the onset of the £5 pint are long gone; these days, in the right poncey craft beer place, it can plausibly be six or seven. The other day, when I ordered two gin and tonics, the barmaid asked me if I wanted doubles – then immediately answered the question on my behalf. She didn’t tell me they’d set me back £16.

And yet I paid it. We always pay it. Because the place next door is unlikely to be any cheaper; because it’s too socially awkward to blurt “Are you insane?” and storm out. At worst, we hiss “Bloody London” as we put our hand in our pocket, just like Waller-Bridge said we did.

London, it is widely assumed, is the most expensive city in Britain. Once in a while, a ranking will appear in which it’s pipped to the post, usually by Oxford, but those generally turn out to involve measuring prices relative to income, rather than raw numbers. Disappointingly for editors desperately seeking a remotely surprising headline, the capital almost certainly is the priciest city in Britain.

But it’s not immediately obvious why this should be. Prices, after all, are meant to be set by the law of supply and demand, and it’s not as if London is short of pubs or coffee shops. Why aren’t they all trying to out-compete each other by driving the prices downwards?

The answer seems to be that there are other factors that help set prices. One is what customers are willing and able to pay: your refusal to pay £5 for a pint is not going to stop pubs charging it, just so long as there are plenty of other mugs who will (or who’ll pay £8 for a gin and tonic, come to that). Another is the price everyone else is charging. A pub that charged £5 for a pint probably wouldn’t last long in a town where everyone else was charging £3. In London, though, overpriced pubs can enjoy the safety of the herd.

All that makes me sound terrible cynical about the motives of London’s price-gouging drinking establishments, so let’s add another, more reasonable item to the list. Another factor that contributes to price or a product or service is the cost of actually providing it – and in London, those costs tend to be higher.

Commercial rents in London are high for the same reason that residential rents are: there’s huge demand

The raw materials that go into the cost of your cocktail or your sandwich may be pretty similar, whether you buy it in Islington or Ilkley. But the wages business owners have to pay to persuade someone to serve it to you will almost certainly be higher in the former. In part that’s because wages are higher across the board, forcing pubs and cafes to pay more to recruit staff; but it’s also because, yes, the cost of living is higher.

And then there’s the biggest cost of all facing most London businesses. This, as it happens, is also the biggest cost facing most London residents: property. Commercial rents in London are high for the same reason that residential rents are: there’s huge demand for tightly constrained supply. There are all sorts of explanations for that: high land prices, planning restrictions, the flaws in property developers’ business models, the flood of capital that has inflated the property bubble since the financial crash ...

But one ultimate effect of all this is that businesses have to charge customers more, just to generate the revenues needed to cover their rent. If they didn’t they’d go bust. All this means that it costs more to provide you with a coffee or a sandwich or a pint in London than it would in most British cities – so prices are higher, too.

In other words, your coffee is expensive for pretty much the same reason that your rent is so high. Londoners just can’t catch a break.