The S&P 500 continues rewarding investors. After climbing 24% in 2023, the benchmark index finished 2024 up 23%. That's a tremendous 24-month gain. But not all companies have benefited from the rally.