People can have many different priorities. In some affluent neighbourhoods, the priority is McMansions and cars; in others, the golf course and its dues; or a marina; or bridle paths[0] and a covered jumping ring.[1]
In other neighbourhoods —maybe (perhaps often?) not so affluent— the priority is education, and people tend to move there with either the explicit or implicit idea that in paying a premium for their house, they are helping to guarantee that the parents[2] of their children's likely friends, having paid a similar premium, also value education.
Maybe things have changed; I haven't been in the Old Country for a couple of decades, but in the XX the easy way to spot "the good district" was that all the real estate ads (by way of explaining the premium on the ask) explicitly mentioned "${DISTRICT} schools".
[0] the least interested person in her children's education I knew was a horsy friend, but even she hoped, that upon finishing their senior year and should they have learned nothing else, her children would be capable of reading and understanding a contract.
[1] southern california examples, which may be horribly dated (cf supra): Thousand Oaks, Westwood, Newport Beach, Rancho Mission Viejo
[2] I owe the start of my tech career to this correlation in the reverse direction: https://news.ycombinator.com/item?id=40531987