You’re kidding, but the “posh” accent of the British upper classes is to a greater or lesser extent trained rather than merely acquired when one is learning the language as a child.
Also people with regional accents often actively make an effort to change their accent to RP (aka the BBC accent) when they move to places like London, though I supposed that’s pretty common the World over when people whose regional accents are from places deemed “provincial” move to the big cities in more prosperous regions.
Oh, and immigrants, I almost forgot immigrants: many people with foreign accents do make a lot of effort to speak the local language with the local accent. In fact, for many immigrants in Britain this joke is pretty close to reality.
So there’s actually a drop of truth in the joke.








I speak a couple of languages with enough fluency to spot accents (including English, having lived in Britain for more than a decade) and in my experience even small countries have lots of distinct regional accents.
That which you describe is pretty much true everywhere with all languages - people from abroad who don’t speak the language can’t really spot accents unless they’re at the fluency level of speaking that language and even those from countries were the same language is spoken can’t really tell apart most of the accents in that different country beyond rough categories (so for the British Isles that would be “English” accent, “Scottish” accent and “Irish” accent).