Reinvesting usually adds up
SPY's dividends kept as cash left you with $38,669 after ten years. Reinvested on their ex-dividend dates, they made it $41,959, because each one bought shares that grew and paid dividends of their own.
Neither is wrong. If you spend the dividends, the cash version is your real total return, and comparing it with a fund's published figure makes you look worse than you did.
AllInvestView