There are a few issues with your line of reasoning.
First is that the increase in productivity has anything to do with teachers. My personal experience has been that it is due to technology (both 'hard' tech like advances in electronics and 'soft' tech like Lean, Balanced Scorecard, and other improvements in the methods by which we organize people) that is responsible for the increase in productivity. The 'teachers' of these tech improvements (consultants, enterprising employees, entrepreneurs, etc.) absolutely have been rewarded.
The second issue is the assumption that the educational system allows for differentiated remuneration based on value provided. If teachers' pay was differentiated based on the quality and quantity of output, there would be incentives (and therefore more effort) by motivated teachers to provide greater numbers of students with a higher quality of education. Many people who actually have the skillset required to improve the educational system would also find it worth their while to participate there rather than in industry. Current systems, however, do not permit such differentiation so there is little economic incentive. Furthermore, interested outside actors (e.g., tomorrow's employers of today's students) have no mechanism by which they can reliably incentivise and provide resources to good teachers, so it is in their best interest to instead withold resources from the K-12 educational system and employ them in internal training systems or to higher ed scholarship programs instead.
The final issue is the fact that progress in every aspect of every society in the world has at times been subject to disruptive change. That is to say, further improvement to the system may be directly detrimental to and against the interests of many current participants in the system. In many cases we can also see that incumbents deferring or preventing the disruption in an area essentially deferred or prevented progress in that area by doing so. Technology and cultural evolution have driven disruptive change in all aspects of industry that are now much more productive than they had been previously, while disruption in the education system has not been allowed by participants in the current system.
In summary, there is no incentive for the educational system to provide education for any purpose besides improving the standardized test scores by which the system's funding is determined, there is no systemic incentive for teachers to teach better or for highly skilled individuals to become teachers in the first place, there is no systemic incentive for outside entities to improve the existing educational system, and there are many systemic barriers to disruptive improvements. In the end, K-12 Teachers are in fact expected to provide less of the total education ultimately required to function in society (one could argue that they have been prevented from providing it), so society has largely distributed the benefits of increased productivity elsewhere.
Just to be clear, I feel that good teachers are among the most valuable people in a society. The issue is that systemic problems essentially limit their ability to actually apply their skills effectively and to receive economic rewards commensurate with value provided. These two overarching problems discourage both idealists (because their ability to make a positive difference will always be limited, minimized, and often even discouraged) as well as pragmatists (because there is no economic incentive). The stranglehold that incumbents have on the system also prevents (or at least significantly hinders) innovative but disruptive improvements from gaining any traction. This has largely resulted in a feedback loop where the improvements in K-12 education have not kept pace with the educational requirements of society, so society allocates more resources to higher ed or other education systems instead, and the people with the knowledge and skills required to improve the system take their skills elsewhere.