The economy of DS9 was established before the arrival of the Federation. I think Starfleet brought the replicators and the Replimat with them.
I believe the Cardassians already possessed replicator technology, there were replicators on the station before Starfleet arrived, at least in a few places.
Whatever natural resources the Cardassians were extracting from Bajor, the replicators couldn't produce those resources. Not at the same cost, or in the same volume.