Yeah, its rude to ask someone how much money they earn. For multiple reasons.
Firstly:
In most contexts it does not matter whatsoever. Why does the amount someone else earns matter to you? How does it affect your opinion of them in any way.
Secondly:
95% of the time it is being used as a method of competitiveness or to try and rate how successful and important someone is. It is rude because in most cases the only reason you are asking is to try and find out if you are superior to someone else.
Now, there are some cases where this is different. If you are actively talking about living expenses (I asked my friend who lives in Dubai how much she earns cause she lives in Dubai.), then its fine. Stuff like that. But in most cases it is just simply rude. Or pointless. So yeah.
Meh. I would get annoyed if someone asked me how much I was earning. Hell, I get annoyed if someone asks me what I do for a living fullstop. When they find out I am a student, I get pretty pissed off when people ask me how I am doing, grade wise. It is always to be competetive. If it is from a relative, it is so they can go "Oh, well, I guess [REDACTED] is not as good of a University as Oxford, Tom is getting a First!", if it is from a stranger they will either boast about their grades being better or go silent.
I guess I am saying we should have better ways of comparing ourselves to each other than how much money we are making and how well we are doing on an arbitrary academic scale. "What was the last book you read" is a good start, followed by "Have you seen Black Mirror?" or "Were you at the protest trying to save the NHS?" or just about fucking anything but how much money you are making.
Because if you really care about how much someone is making, just as an arbitrary thing, then you are a ****. And if someone randomly volunteers that information they are a ****.
tldr;
Its rude and actively pisses me off.