They're a democracy whose legitimately elected leaders made a legal treaty with another government, and I assume the treaty had broad support outside of that small minority of colonists.
So because they were elected and created the treaty through legal channels, it must have been the right thing to do. Of course. There were lots of people who thought it was a good idea, so that makes it all okay.
The Federation should not have given those planets up to the Cardassians. The Feds knew full well that the Cardassians had a brutal history of oppression, slavery, and atrocity. They weren't right to give those planets up.
At the same time, it would have been far more rational and intelligent for the Maquis to leave. Absolutely. And of course, humans only ever make rational, intelligent decisions, right?
So while the Federation may not have had the right to surrender those planets to the Cardassians, it's important to remember that it was the Cardassians, not the Feds, who brutalized the colonists. Did the colonists have a legitimate grievance with the Federation? Perhaps, but that doesn't really justify their actions. As JediKnightButler said...wait, JediKnightButler? What kind of a name is that? :P I like it. So, as JediKnightButler said, what was their endgame? What did they hope to accomplish by attacking the Federation?.
But did they have a legitimate grievance with the brutal Cardassians? Absolutely.
Leaving would have been the right thing to do. But after they decided not to leave, fighting back against the Cardassians was also the right thing to do. It's not a perfectly clear situation, and no one group was completely in the right. Personally, I would have gotten the frell out of there before the Cardassians showed up. There's no shame in running. Not when you're running from a brutal military regime that wants to crush and enslave you and has the power to do so.