We did it so we would not get bombed, rolled and smoked.
Sweden was dirt poor after the wars of 1600s. In the 1800s and early 1900s people emigrated to the USA as people where so poor and the government actually had to stop it for a while. It was only after WW2 we really started to prosper. First due to natural resources, still important exports for us, enabled us to renovate cities, but making the right choices, we also invested in a knowledge based society, government laid phone cables and fibre, had a tax programme for home computers in the 90s/early 00s, school was mandatory early on, collage was free from the start etc etc etc
We are a country of 10milion and we built 3 jets of our own design, JAS Gripen is one of the best currently flying, we design our own submarines, worldwide tech companies like Ericsson for phones, 3/4/5G, Software companies like Spotify, Gaming like Minecraft, Battlefield, Division, SAAB/Scania for trucks all over.
Imagine the city of New York doing that, cant imagine.