For a long time, Congress had an exemption to insider trading. They no longer do, but, insider trading still requires material non-public information about the company in question -- and Congressional acts are the most public thing possible. Betting that a company's stock will go up (or down) and then making it happen after you make the bet isn't insider trading, it's activist investing, and is totally legal.