This is because education is more about gatekeeping and politics than trying to maximize human capital development. We all ostensibly want it to be about human capital but our attitudes and behaviour towards education at the political level show otherwise.
The gatekeeping element seems to have developed in tandem with / response to the signalling hypothesis [1]. Simply put, if kids are trying to do the minimum necessary to get by, we raise the bar on the minimum standard until we're satisfied. Teachers (K-12 at least) respond with grade inflation, adding lots of noise to the signal, and we in turn respond with standardized testing in an attempt to clean up the noise.
The gatekeeping element seems to have developed in tandem with / response to the signalling hypothesis [1]. Simply put, if kids are trying to do the minimum necessary to get by, we raise the bar on the minimum standard until we're satisfied. Teachers (K-12 at least) respond with grade inflation, adding lots of noise to the signal, and we in turn respond with standardized testing in an attempt to clean up the noise.
[1] https://en.wikipedia.org/wiki/The_Case_Against_Education