I don't understand why it isn't illegal.
And, as it happens, so many people own equities passively (through a managed mutual fund, or an index fund, retirement account and the like) and ownership of a company is so diffuse, these provisions have little impact in practice except against another large entity.
I'm not defending the practice -- I think it is a bad management practice myself and don't buy stocks with such provisions -- I'm simply responding to your comment.
[1] https://www.ft.com/content/993e4c11-8729-3168-a280-69e1d400b...