Someone toxic with an attitude problem wouldn't be working at the same place that's for sure.
I understand where you are coming from and I used to think the same back when I was young. I wondered why I was sat next to contractors doing the same (but worse performance than me) job getting paid £500+ a day when I was on about 12k.
I'm afraid this will never end in the corporate world. You have to suck it up and gain that experience or skillset making you command better salary or contractual rate.
Your logic works for when people are like robots and all output the same. But we are human... We offer different levels of output and effectiveness for a given role, and that tends to be rewarded differently to try to compensate the differing levels.
A classic one is when you work in a similar role to someone but that other person has been there for literally years protected, invinsible. The silver haired surfers waiting for redundancy... I've worked with people UNDER me in MY team who were on more than me due to this. They pocketed small payrise after small payrise year after year after year for 15-20 years.
Stuff like that happens and it's not always right but mostly we need to have the tolerance to pay differently to account for situations mentioned above where you have a team of say 20 DevOps engineers all with differing experience and skills. You can't have DevOps engineer level 1 - 10 as that would demotivate an cause issues in itself. This is why people don't talk about what they are on generally. Often you might have DevOps engineer junior and senior to mitigate this a tad, but it's still a bit grey as to when you cross over. Sometimes senior roles are simply that you manage some staff...which is lame.
Your attitude will not get you far. You have to play the game.