If you're better prepared or better at selling yourself at the interview, then you're the one who's gonna get the job. If someone with less/no experience takes your job then maybe you suck at interviewing and need to get better, or maybe the interview process is bad at judging top candidates, but either way it's your responsibility to adapt to the variable interview process and prove yourself versus the other candidates using whichever way you can: work, practice, connections, insider knowledge, cheating, etc. Nothing in life is fair, everyone tries to play their best hand all the time and honesty is not always rewarded, which you'll find out the hard way.
Everyone deserves exactly what they manage get for themselves. That's exactly how meritocracy works. You're not entitled to deserve a job from the start, out of of some holy moral principle. There's no such thing as "I deserve", there's only "I competed, and I won/lost".