Because depending on the historic make up of a school’s alumni, legacy admissions may disproportionately advantage wealthier families and white students. According to a 2019 paper from the National Bureau of Economic Research, 70% of Harvard’s legacy applicants were white. If affirmative action goes away, it will be harder to defend and retain legacy preferences if diversity remains a goal.
There’s a very active discussion about this elsewhere on CC: