The Federation tends to be relatively pragmatic at a macro level when it comes to dealing with other civilizations. The Ferengi aren’t saints, but they’re not hostile, are open to diplomatic relations, and for the most part will honor contracts and agreements.
The Federation has to deal with openly-hostile forces like the Borg, the Dominion, questionably stable relationships with the likes of Klingons and Romulans, and isolationist/xenophobic groups like the Breen. Compared to the above, the Ferengi are pretty benign.
It’s worth noting that the Star Trek universe isn’t as heavily defined by capitalism as our world. There are cosmic horrors out in the universe that make the differences between the Federation and the Ferengi seem insignificant. There are literal dragons out there, and the Ferengi just aren’t that, despite their obvious flaws.
The Federation seems to follow a strategy of establishing peaceful relations on whatever terms they can get, with the long-term goal of bringing new civilizations into the fold over time. They clearly believe that FALGSC is the natural progression of societies, but they clearly don’t feel that they have the means or mandate to impose it on others, so they use the tools and opportunities they have to grow and maintain their influence to that end.
So yeah, the Federation isn’t going to impose itself onto the Ferengi by force, and refusing to establish ties with them would likely make conflict more likely, so they take the practical step of dealing in good faith with a civilization that, while not ideal, isn’t trying to conquer or exterminate anyone.