There’s definitely a hierarchy to Ivy League schools, but it varies depending on which one you went to.
(Source, one of 3 in my immediate family who went to an Ivy.)
The notion that FB/Amazon hire primarily from the top 5 universities is so totally unrelated to reality that I feel like I'm watching people discuss the consequences of the fact that the earth is flat.
Perhaps to some extent some are optimizing for social class (staying in the one they grew up in).
Big tech companies tend to have interesting work. Why would anybody jump through the hoops to go to a top university to get an ordinary coding job?
A common "feeling" among many of my classmates at the time, was that most of us went to CMU because we couldn't get into MIT.