It isn’t illegal because no one made it illegal, it’s pretty obvious no? But being a little less flippant, I can’t see any reason why it should be illegal. If I buy a company I should be able to do whatever I want with it. If shareholders didn’t have the power to make choices about the company they own, the very fabric of capitalism would be undermined.