The point is not if the politicians did better than they would have with another investing approach. It's a standard conflict of interest: the appearance of insider trading is corrosive because others see it and figure it's "how the game is played." So they need to do the same to keep up.
It's hard to find a calculator/data source that takes dividends into account, but it looks like if you bought an S&P500 index fund in May 2022 you'd be up around 18% depending on which day you purchased. So not very dramatic IMO