The Nixon Shock was the culmination of several years of gradual collapse of the post-war economic system (including Bretton Woods). If you look carefully at the graphs on that page, a lot of them were trending upwards before 1971.
To be fair, his hand was kind of forced. Other countries were already abandoning Bretton Woods, considering it unfair as it gave the US a disproportionate amount of power to manipulate its currency. It's similar to the currency value struggles that have been a major fault line in the EU.
https://en.wikipedia.org/wiki/Nixon_Shock