There's not just one
I would agree that schools are compromise institutions. There are so many competing requirements that deciding what a school is there to do is a dilemma, not a puzzle. If nothing else the pandemic made it very clear that for most of modern western society, school is tax-funded daycare. It's also very productive daycare as it educates. But then inevitably things get tricky. If you look at school mission statements they nearly always demonstrate how muddled the thinking behind purpose is. When I am in one of my more grumpy moods I will often suggest that what we exclude is as indicative of what we value as what we include. But that act of editing our sincerest hopes is difficult. Similarly, if you really name your school values, then inevitably you will come to a moment when something in day-to-day practice is antithetical to those values. As a school administrator I think those are some of the most interesting and challenging conversations I find myself in.
Would people be happier if parents and schools were able to match with each other based on their values? We can see this to some extent with parochial schools, but they're on the margins of the wider schooling world.