After industrialization, selling industrial products was frequently far more profitable than the expensive and uncertain spoils of war. Even colonialism was frequently a net loss for the governments.
And there wasn't really a likely reality where Nazi Germany fought their war in a way that was actually winnable, their overconfidence was only matched by the idiocy of many of their tactic and strategic decisions.