I think Starfleet officials in particular are given suitable credit for trading wherever currency is required. That's how Crusher got cloth, Scotty got his "pay", and how they are all able to go to bars. Bars have to operate with currency by law to put some sort of limit on drinking