For those interested in the nuances of insider trading, I highly recommend Matt Levine's writing. He seems to touch on it in almost everything he writes, and basically as the only law (as stated above) is a generic rule against "fraud" (which can be tricky to define in and of itself), there's a lot of case law that isn't all consistent.
In general, it's not illegal to trade based on knowledge of one's own future action. That is, if $PopularHedgeFund is about to buy a bunch of stock, that may end up being Material Information, since the very fact that $PopularHedgeFund thinks the company is a good buy is likely in and of itself to increase the price. But they're still allowed to buy it, even knowing that them buying it will increase the price, as there's nothing "insider" about it.
The whole idea behind the free market of stock investing (for better or worse) is that investors would do research to find out which companies are good investments or not, and buy or sell them accordingly (including short selling). Otherwise, there would never be any input to the system to try to mark companies to the "right" price. So, if one finds information out that a company is doing a poor job of something, selling their stock (including short selling) is the capitalist way of communicating that information to help the market set the price of the company "correctly". The process rewards investors who discover information about a company (by letting them profit off of the information being distributed), and thus companies have a close-to-optimal distribution of capital among them. And so without it, there might not be an incentive (or at least not the funding) for people to (for example) research and disclose life-threatening security vulnerabilities.
That's the argument in favor of allowing this kind of thing. Obviously not every aspect of capitalism is ideal, but it does have some benefits.