There was no good macroeconomic reason for austerity at the global level over the last five years, and austerity seen in periphery Eurozone countries could most probably have been significantly milder. As austerity could have been so easily avoided by delaying global fiscal consolidation by only a few years, a critical question becomes why this knowledge was not applied. While the unfortunate timing of the Greek debt crisis undoubtedly played a small part, it alone cannot explain austerity in the US and UK, and the weakness of the European left in failing to oppose austerity.
Austerity was the result of rightwing opportunism, exploiting instinctive popular concern about rising government debt in order to reduce the size of the state.
The idea that deficit concern was being used as a pretext to reduce the size of the state, which I will call the deficit deceit hypothesis, is based on two propositions:
1) Political parties on the right want a smaller state, but popular support for such a programme is, at best, mixed.
2) From 2010 there was strong popular support for reducing government deficits.
Popular concern about government deficits will be much greater if these deficits are at 'record levels', which they inevitably were following the deepest global recession since WWII. A recession initiated by a financial crisis is also likely to see consumers reducing their own borrowing, and so (erroneous) analogies between governments and households become more persuasive. A recession initiated by a financial crisis also makes the public receptive to the potential power of these markets. Arguments that rational markets would not be concerned about government default when the central bank can create money are met with a widespread belief that the recent crisis means that markets 'are not rational'.
This opportunism, and the fact that it was successful (in its own terms), reflects a failure to follow both economic theory and evidence.