Exchange is illegal, but not making change. Perhaps because of the language barrier they thought you might want to pay with USD.
There is a change machine in nearly every bus/train with conductorless operation, you take a boarding ticket when you get on and you pay when you get off. They're used to tourists screwing up and just ask where you boarded.