For me, it is like being a public employee in Finland and demand payment in American dollars.
Almost every government allows foreigners to earn their currency. I can tender for government contracts from Finland even if I live the other side of the world, they want the best product available
But I was not talking about foreigners earning national currency. Public sector employees which are hired by the government are expected to get their salaries in the national currency. I don't mean diplomats or people that work abroad. If you still don't get my point, think about one government trying to issue another government's money without the explicit consent of the latter. This money would be unreservedly and invariably declared as counterfeit.
In fact, such attempts at printing foreign currency did happen in history before, and the outcome was quite predictable.