They have two options:
1. A foreign country can pay with dollars it has acquired through trade with the United States, (like oil for instance). The most useful thing to do with American dollars is spend them somewhere in the American economy, so for countries that are net exporters to the US, investing their dollars back into the US economy usually makes sense if they don't have anything they want to purchase.
2. A foreign country can pay using it's currency should the US be looking to acquire some for the purpose of importing products from taht country. Oil would be the best example of such an item, except that oil is denominated in US Dollars around the world anyway.
Most of the time it's option 1... in which case the bond is a way to reaquire our dollars from foreigners without selling them a product. Well, we are selling them a product... we're selling them debt.