Investing in certain stocks can pay off in the long run, especially if you hold on for a decade or more.