"I need to see a cardiologist, but there's a long waiting list. Fortunately, my dad is a cardiologist so he saw me immediately."
Few people would think that this action should be illegal.
Compared with:
"I need to see a cardiologist, but there's a long waiting list. Fortunately, I'm White, so he saw me immediately."
(notice how it's still distasteful even if we replace White with Black, Asian, or whatever).
Notice as well how the situation is different if we're talking about a public hospital--in that case we wouldn't accept the nepotism case.
So there's real reasons why we would allow a private institution to have legacy admissions but not race-based admissions (and...come on. Only in the USA would that sentence be controversial!).
The rub is that in the USA many (most? all?) private institutions--yes, even Harvard--receive government support, participate in government programs, and so constitute a sort of shadow arm of the government.
The real answer, unpalatable though it may be to most, is that if private universities have legacy admissions, they should receive no govt support