Human laws reinforce power and social dynamics, stable equilibrium solutions the result of thousands of years of human conflict.
There are no "rules" beyond physics, and the rule breakers often wind up ahead.
The rule makers don't want to pay for those that cannot contribute more than they consume. To put it another way, they don't want their taxes to go up. One lever to control this is through immigration policy.
The voting class is told unskilled immigrant labor is a net negative. Skilled labor, a positive. One side tells them skilled labor threatens their jobs and total compensation, another side tells them it's alright and that we're at a shortage for labor. There are abstract reasons you can point to for each of these ideologies, but ultimately each side is fundamentally concerned with money.
Every one of us is ultimately about consuming energy. For those of us fortunate enough, we can care about Starbucks, how many homes we own, and what kind of luxury goods we have. But at the end of the day, if it were all taken away and we had to fight for food and energy, nearly every one of us would.
Step out into the Serengeti alone and you'll be eaten. There are no rules.