No, you’re not comparing things globally. You’re comparing apples to oranges; the median salaries in the UK against the Silicon Valley in the US, where living costs are completely ridiculous. It’s not like developers across the entire country are getting those salaries, not even close! It’s like comparing salaries in london to those in Newcastle.
Also don’t forget that most Americans have far less paid holiday, so you need to adjust for that difference too.
Try comparing like for like and check the salaries across Europe and tell me that ours are bad! I can tell you now that even in Western Europe there’s very few that are higher than the UK — Switzerland and Germany are the only ones I know of off-hand, and their tax burden is accordingly higher. Or how about you look at Asia where it just isn’t even close? How can you possibly say the salaries aren’t good globally when we’re very likely in the top 5 worldwide?