What they are trying to do is force the people of Indonesia to use the official local currency, because if they don't then it isn't worth a damn.
The government of course has a different set of rules for itself.
Indonesia hates the dollar so much they sell bonds backed by dollars lol.
Would you want to buy a bond backed in some local currency without even a 20 year history of stability? Well, generally the answer is no. So they sell bonds backed by dollars.
Would you want to keep your life savings in a currency like that? No. While it's not illegal to hold dollars, consider that if you are holding dollars you wouldn't bother to exchange them to make a purchase if you didn't 'have to.' You lose money on fees whenever you exchange currency when you are 'the little guy.' You do not get 'the market rate.' If it wasn't a good idea to use dollars at the individual level, they wouldn't have the draconian laws trying to stop people from acting in their own immediate self interest.
Also, whether you are from Indonesia or if you travel to Indonesia and want to exchange dollars, they will give you less money the older and wrinklier etc the bill itself is. So that's another way you lose by exchanging. They do this because unlike US banks, they can't just trade old bills for new bills.
It all helps the government acquire and hold lots of crisp, relatively new dollars, which of course they need for those dollar backed bonds they sell.