Whereas in Japan, they learned quite brutally and cruelly because of WW2, what the dangers are of over-reliance on a govt (no matter what your society is like)...that grabs the nationalism banner for itself exclusively. Thus lot more of this foundational true people-based nationalism approach instead in Japan. You can see it for yourself, how Japanese schools were like before WW2 too (and Japan in general, and japanese goods quality etc), they really were not great at all, or even average....because the govt had imposed itself as the be-all end-all agent....above and over the common people.....rather than subservient/accountable to them.
It is not exactly what you are thinking about Japan about the past and present. Japan was not really
dependent upon the govt but on the govt supported by the ultra-nationalist military since after the Russian Baltic Fleet was destroyed by the newly built Japanese Navy in 1905 in the Sea of Japan. Japanese fleet kept on chasing the Russian fleet up to Vladivostok. A 100 Russian ships were destroyed.
A country does not develop in a single day and its products do not get applauds overnight. Every country has to go through a certain painful process. Even Germany was the sick man of Europe before Bismarck.
A school is not about the buildings but its curriculums and the quality of teachers/education. Whatever may be the quality of school buildings Japan emphasized more on mass 100% education that it achieved in 1905 through a continuous 40 years of efforts. The Curriculum is based on nationalism and human qualities like manners, sincerity, honesty, morality, discipline, dutifulness, mutual respect, and a hundred other things. These were from Confucius philosophy.
Success in producing better quality human assets resulted in the production of good quality goods in this country. You are talking about bad quality Japanese products, but the quality was almost the same in Europe and America in those days. Technology improved step by step and Japan continued to improve its own and imported technologies before and after WWll.
Many things went well in Japan because of the respect the citizens have for the Institution called Emperor. After the Meiji Restoration, the top bureaucrats, engineers, and doctors scrambled to Europe and America to learn the western ways and adopt/adapt these in Japanese society. However, the quality of life did not improve that much because of international politics. Instead of thinking about quality the govt had to go to build up a strong military.
This military bureaucracy was responsible for engaging in war with 5 great powers in the WWll - USA, England, France, Holland, and China. It was not a small feat of action by an Asian country. Even after the WWl, the white big powers were forced to sit with new Japan.
Quality of life was miserable during the war. But, Japan gradually
re-built its industries. Note that I said "Re-built". Japan built many industries in the 1910s even in Taiwan, Manchuria, and Korea. Japan had the technology but the quality of life improves only gradually and not immediately. This is why we can see how the Japanese have improved the standard of living to a level higher than in many countries in Europe in gradual steps after WWll.