Undergrad question

I have read over and over again on CC that law schools and medical schools do not care about where people went to UG, and the only things matter are LSAT and GPA, but at some point common sense has to prevail.

We know to get into top law schools, one probably should have 3.8+ GPA and over 170 LSAT. How many top tier college students with 3.8+ GPA want to go to law school? (probably quite a few) And if they could get into those top tier colleges then it is pretty likely they could get 170+ LSAT scores. If you were a law school adcom would you think, “3.8 from a top tier college is the same as 3.8 from community college or 2nd/3rd tier college?” If I were a top law school adcom, I would only take students from lower tier schools with near perfect stats when I have a large pool of applicants from top tier UG schools with median stats to choose from.

This is Yale Law school UG represented:
https://law.yale.edu/admissions/profiles-statistics/entering-class-profile
They are schools that we are all familiar with. It doesn’t show how many students from each UG school, but years ago when they used to post it, I saw majority of students were from Harvard, Yale and other top UG schools (large percentage were from Harvard and Yale), but only a handful from outside of top 20 schools.

To carry this a bit further…I think we would agree students from Cornell, JHU, NU, Chicago are probably just as good test takers as students from Harvard and Yale, and their GPAs from those institutions are probably just as competitive as GPAs from Harvard or Yale. So why did Yale admit more students from Harvard and Yale than any other UG schools? (Last time I saw the break down with numbers was 6-8 years ago)