The Treasury does not have the ability to "create money out of thin air." That is not how any of this works. The treasury, when it buys something, does so either by using tax receipts or by issuing bonds. The tax receipts are spent. The Treasury is issuing bonds.
The Fed could create money and use it to buy Treasury bonds on the open market, as part of its Open Market Activities to manage interest rates (which is exactly what it would do if the Japanese sold US treasuries)
Ironically, the law actually forbids the Fed from buying bonds directly from the treasury, so the treasury has to float the bonds and then have the Fed buy them off the open market if it chooses to do so. So again you can see how insane this move by the US Treasury is.