People need to have some sort of purpose to their lives. Nations need a sense of purpose as well. That sense of purpose can come from religion or from a political ideology. But it can come from something more straightforward.
I‘ll use Australia as an example. The Second World War, in an indirect way, provided Australia with a sense of national purpose. Australia found itself at war with Japan and Australians felt themselves to be in mortal danger. For a country with a small population the problems were particularly acute. It was not an actual lack of military manpower that was the problem. The problem was in providing the troops with the means to resist an enemy. Specifically the problem was modern weaponry like tanks and fighter aircraft which could not be obtained from allies like Britain and the U.S. because those countries were intent on building up their own strength. Australia was forced to design and build its own tanks and fighters. This was done but there were problems. Australia simply did not have aero engines suitable for modern fighters.
Australia drew certain lessons from this. If we were to be able to defend ourselves we needed a large modern industrial base. That would require a larger population, hence the aggressive drive to attract immigrants from Britain and southern Europe. A larger population would not however be enough. The government would have to take steps to ensure that the necessary industrial base was developed. The objective as to achieve a measure of self-sufficiency. Australia should have a manufacturing sector capable of producing the complex products needed in the modern world. This would include military aircraft (built under licence) but also consumer goods such as washing machines, refrigerators, cars and light aircraft. A manufacturing sector capable of producing such products would be the basis, in time of crisis, for the production of the weapons needed to defend the country.
On strictly economic grounds it made little sense. We could import all that stuff much more cheaply than we could manufacture it. If the only goal was to become rich it was probably not the best way to go about it. But becoming rich was not the only goal.
Of course there were other considerations. Manufacturing provided good well-paid jobs. Full employment was considered to be important. Even the conservative parties thought that full employment and decent wages were good things. Money was a fine thing and profits were a good thing but government was about more than money and profits.
Turning Australia into a modern relatively self-sufficient nation with a strong manufacturing sector and high-tech capabilities, rather than a nation dependent on exports of primary produce, became a national goal of sorts. It was at least something.
Then in the 70s and 80s we turned out back on such goals. We began to dismantle our manufacturing sector. We could get rich by digging stuff out of the ground and selling it, Self-sufficiency was old-fashioned. Greed was much more modern and up-to-date. Who needs national goals?
Maybe we did become rich. I’m not convinced. We’re supposedly a rich nation but in the 60s most Australians could afford to buy a house and today they can't. And maybe when you give up on having national goals you give up something that matters. And you’re not a real nation any longer.