That’s not true. It’s still illegal even though they get away with it. You’re thinking of bribery lobbying.
According to the STOCK Act of 2012, they could be brought up on charges for a trade performed after gaining knowledge of a pending change in legislation that would affect the value of a stock, prior to the legislation being publicly enacted. The SEC just hasn’t charged them.
What they do is not legal, they just live above the law.