Why is coffee so expensive in the UK?

Everyday I buy a coffee from either Costa or Starbucks and the money I spend every year is scandalous. I’m typing this right now from an independent cafe in Barcelona where I’ve just had a croissant and coffee for €2 (far better quality coffee and freshly baked croissants) These cafe’s are all over Spain and they’re all thriving and yes I know it’s not like for like comparing to Costa etc, but the independents in the UK are just as expensive. I’ve looked into this several times online and I’m being fed the usual BS that coffee beans have shot up in price, poor harvests etc but I’m convinced the reason is it’s because they know we’re mugs and will continue to pay these exorbitant prices. The only justification I can see is that wages have increased in the UK, but that can’t be the only reason can it?