The popular way of dealing with the issue is to blame the quality of the teachers, and the proposed remedy is to educate teachers more. This, in turn, angers teachers, who feel politicians are really saying that teachers are not qualified to do their job.
If this was the case, low grades should be randomly distributed among the "bad teachers". A bad national average, on the other hand, reminds me more of a systemic failiure. And I see good reasons why this is a plausibe suspect.
At a minimum of every four years, and sometimes more frequently, there is a new ministrer of education who wants to "do something". This has lead to many reforms without allocating resources to follow through with them. Part of the reforms adds an extra burden of documentation - which takes precious time away from the real work teachers are supposed to do. The burden of documentation can also be considered a lack of trust from the overhead administration, and politicians in particular, the ones who ordered the documentation to be created in the first place.
Good work is achieved by accessing the worker's drive. Research has boiled this down to three items: Purpose, mastery and autonomy. Political reforms that attacks on teachers' autonomy, feeling of mastery and pupose are therefore also an attack on their drive, which in turn is a direct sabotage of their work.
This said, it would also be interesting to look at the student's drive. I am sure students, too, would learn better if they were allowed to find their own purpose, mastery and autonomy of their own learning situation as a drive for their own learning.