Companies can do a lot of things that are morally reprehensible without fear of legal consequences. It doesn’t make it OK, and it certainly doesn’t mean that they have “a right” to behave that way.
While having a moral right to something (or not) is definitely important, when push comes to shove it’s the legal rights that come into play.
Legally recognized rights tend to underpin most definitions of ‘rights’ someone has, since if the legal system doesn’t recognize it, it’s nearly inevitable it will be stomped on at some point with no recourse.
And when that happens regularly, it’s hard to claim it’s a right anymore as practically it isn’t.
Companies are gonna fuck over their employees either way but I totally agree that's not the kind of thing they have a right to. The world isn't dystopian enough yet.