Testing on today's index constituents excludes every company that went bankrupt or was delisted, and survival correlates with returns - so measured historical performance is inflated.
Fund databases have the same problem: poor performers close and vanish from the record.
The fix is expensive: point-in-time data reflecting what was actually in the index on each date, including entities that no longer exist.
Related. Backfill bias - databases add entities after good performance and backfill their history - biases early data favourably in the same direction.