We have a fairly solid understanding of an ideal economy. If the economy was run according to current theory, we'd avoid a lot of issues (and find new ones we would address, of course).
However, the economy is run according to political whims, so most of the economic theory gets thrown out the window. It's pretty easy to run into major issues when nothing stays consistent for more than a couple years, and the interests of those in charge do not include a stable and sustainable economy.