Standardized test scores are far from the full package that the applicant brings. Indeed, since standardized test scores tend to correlate well to family income, and legacies (particularly HYPS legacies) likely skew much higher in family income than the overall applicant pool, it is entirely possible that legacies are better than average in standardized test scores, but not necessarily in other application aspects (HS GPA, extracurricular achievement, etc.), so at least some of them “need” the legacy preference to get admitted.
It is likely that some of the higher legacy admit rate is due to being a stronger applicant pool – HYPS legacies tend to grow up in very advantaged families who can send them to the best schools, give them full support to achieve to their highest potential in school, standardized tests, and extracurriculars, minimize barriers, etc., so that they can present the best college application credentials. But if that were true for all legacy admits, there would be no need for the colleges to give any legacy preference at all.