Money is pretty simple to explain...
Everything that cannot be replicated such as property, transport, energy sources and latinum exchange is done with credits. Since people don't have to spend credits on anything needed to survive or live a comfortable existence, it eliminates the need for material wealth and acquisition. Those in organisations such as Starfleet probably have an enormous accumulation of credits because they have very little need to purchase anything whilst in service and when returning home from deep space assignments, they have the credits to purchase property in idyllic locations, such as Kirk's San Francisco apartment (although 23rd and 24th century Earth locations may all be idyllic in Star Trek!)
People like Kassidy Yates are attracted to the lifestyle of running a cargo ship. As independent contractors they have to provide the energy sources needed to power their ship and provide their staff with wages - especially the non-Federation citizens. Those such as Yates want to travel space but have no interest in joining Starfleet or similar organisations, so they do it themselves and are thus required to work more frequently with currency than they would within the Federation.
Except that money was eliminated (went the way of the dinosaurs) in the late 22nd century (well before the invention of replicators) when the New World economy took place.
Voyager clearly established this.
Besides, you don't need replicators or transporters to eliminate money.