Schools in Western countries have "catchment areas" — a Voronoi diagram, for each level of schooling, that clusters residences by which school is closest to them. If you're sending your child to public (rather than private) school in one of these countries, then your child is assigned to a school based on which catchment area your home falls into. You can't send your child to a school other than the closest one to you.
(Yes, this means that a large part of housing prices in these urban areas is driven by parents or soon-to-be-parents fighting over the housing that exists in the catchment areas of the best public schools.)
This is usually combined in civic planning with a "service radius" around the school, to decide when new schools are needed (vs. just expanding existing schools.) For rural areas, the service radius is defined by practicable bus pickup loops (you don't want a bus that takes an hour to get to the school); but in dense urban areas, that radius is usually defined by walkability — on little child-sized legs!
The combination of the concepts of "catchment area" + "service radius" means that if you live in a city in one of these countries, it's almost impossible that you're going to live somewhere where your child fundamentally cannot walk to school (purely in terms of distance.) Which is a major reason why everyone makes fun of people in cities in the US (which uses both of these concepts in most municipalities) for driving their kids to school, when that school is by law a distance away that the kid could walk.
(I know that the problem in the US often isn't the distance, but what's between the home and the school — dangerous major thoroughfares with no sidewalks cutting through neighbourhoods and the like. Which is still the US being dumb; just on a different level.)
USian here, my daughters high school will be over 9 miles away and crosses 2 major interstate exchanges. Google says it's a 3 hour walk. The school itself is in the middle of nowhere and pretty much demands that kids be driven or bussed to it.
That's what you get when you design a country around vehicles. High school here in NL is a 3 km bike ride. In rural areas that can go up quite a bit but it's still doable by bike except for some of our smaller islands.
Growing up in my area of Michigan there was a concept called school-of-choice (which a school has to opt into.) If so, any student can attend that school and not only ones within it's designated area.
In my country, middle schools are small, so a 10k city can have 3-4, and most kids do indeed live in centric locations, which mean only a fourth of them at most don't walk/bike there.
Also, you get assigned a public school depending on where you live (the closest) so unless you go to a private school, you're going to the closest one.