My reading of history points to a bit of both.
FDR with the gold confiscation and dollar devaluation was premeditated.
For the 1940s, that was more haphazard. Inflation broke out from war-related money printing, and the Treasury basically forced the Fed to keep yields low to finance the war, which combined with the gold ban and capital controls, inflated away large swaths of debt.