At our school, the #1 reason kids choose to apply where they do is location and most often they want to be within 3-4 hours of home, max. Some don’t care, but most do (or their parents do).
I suspect that’s different at boarding schools and other elite privates, but I bet it’s similar at most average public high schools.