I do some work in the NYU undergraduate admissions office, and also went through all the application crap last year, and can tell you that admissions panels are fickle. For instance, a friend of mine was admitted into Brown, yet was waitlisted at NYU. I got into Columbia, UCSD, NYU, and Brown but was rejected from Berkeley(not even waitlisted). Admissions panels are comprised of normal people, and they accept and reject students based on their own personal intuitions as well as the scores, extracurricular activities, etc. I had to help file over 20,000 NYU rejection folders, and some of these kids had really high GPA's and SAT scores.
That said, legacy is a big deal, especially with borderline kids. A friend of mine had marginally good test scores and GPA, and solid extracurriculars, and was waitlisted at Rice. He ended up getting in off the waitlist above another student who had better scores overall. The difference? The one who was accepted has a sister already in the school.
As for the Ivy leagues, they're like a club, once you get in, you're set, as long as you do the work.