

That has certainly been the case in some places, though by no means all of them. Enforcement is also a separate issue to the law itself.
But to provide some maybe better examples, do laws that enshrine workers’ rights to form a union only serve to benefit the rich? Laws that limit donations to political parties? I really don’t think you can make that argument for all laws.
The US is a hellhole with a billionaire class living above the law, sure, not arguing with that. I guess maybe I should have assumed US defaultism for this question.
But OP made a blanket statement about all laws, and didn’t specify a country either. If your username is any indication you’re a Marxist. How do you think a Marxist state would work without laws?