Why do you think governments consider education to be such a high priority?
My initial thoughts on this is that the answer is rather obvious and twofold i.e. (1) to prepare its citizens to take their place as productive members of society and (2) to provide occupation for children while parents are at work.
Although the second of these might indicate some cynicism about teachers as babysitters, it is a practical element of schools; one only has to consider the chaos, backlash and reported negative impact on the economy of teacher strikes to see the truth of it.
However, as I consider the first element - that is, preparing kids for their futures - this is somewhat more complex than it first appears. Ideally, schools should equip learners with the skills they need to follow their chosen path but it is arguable that schools actually dictate this path to a greater extent, depending on: the designated curriculum (compare 'high' versus 'grammar' schools in the UK; prioritisation of particular subject areas (consider 'core' subjects in different countries' education systems); how competent an individual student is in that particular school's assessments and grading processes (written, oral, performance- or attendance-based) and so on.
Getting back to the question, education is seen as one of the most important areas a government can produce policy for, and so on top of the need to prepare youth for life, there is a political element to addressing issues in this area.
I think it is a truism that governments structure education systems according to their varying beliefs - much to the detriment of the schools at their mercy given the ever-shifting goalposts - and therefore it must be a high priority for governments to influence the outcomes of education for those they 'control'. Governments use education as a way of getting their agenda across, whether this is seen as admirable and called 'excellent education' or entirely self-serving in which case it will probably be labelled as 'brainwashing'.
Ultimately, it would be most fitting if we could say governments see education as such a huge priority as they want to ensure the best life outcomes for each individual, but I suspect the truth is closer to seeing it as such a huge priority given they would like to be the ones whose path is followed most closely to reach their particular vision for an ideal society.