Sisko causes a very complicated chain of events. The most reasonable explanation is that the Bajoran government replaced Starfleet with the Dominion as administrators of the station. When Starfleet refused to surrender the station, the Dominion were authorized to remove them.
Mining the Wormhole constituted an act of aggression against the Dominion. This seriously pisses off Weyoun, and he demands that the mines be removed. However, Bajor hasn't signed a non-aggression pact yet; the paper wasn't signed until about halfway through the episode.
Weyoun's threat to Sisko is that the Dominion will take control of DS9 if the mines are not removed. At the time, he has no way of enforcing this without compromising the negotiations with Bajor, although Sisko clearly believes this won't stop him.
However, Bajor signs the treaty shortly afterwards, and it had one very particular condition:
Sisko: Captain's log, supplemental. Bajor has signed the non-aggression treaty with the Dominion. All Bajoran personnel have been ordered to evacuate the station
And as Rom tells Leeta after their wedding:
Rom: First Minister Shakaar was very clear: all Bajroans must leave the station for their own safety.
And shortly after this, General Martok reveals that the Dominion/Cardassian fleet is headed to DS9, obviously intent on attacking. However, at this point Sisko believes as you do:
Worf: The Dominion fleet should be within weapons range in 20 minutes.
Sisko: Let's hope the Dominion honours the non-aggression pact.
It's not clear at this point exactly what is happening, but a later line from Major Kira helps explain:
Kira: Captain, as a major in the Bajoran Militia I must officially protest Starfleet's refusal to turn this station over to my government.
What seems likely is that a condition of the non-aggression pact was that Starfleet relinquish administrative control over DS9. Considering Sisko's act of aggression against the Dominion, this would be a pretty reasonable thing to ask.
Sisko, however, has refused under Starfleet orders: he needs to finish setting up the minefield, at any cost. At this point Starfleet is technically an occupying force, which Bajor needs to remove. I have no doubt that Weyoun and Dukat helpfully volunteered their fleet to help in this task.
It's also important to note that Major Kira, Odo, and the other Bajoran personnel continue working on DS9 after Starfleet leaves. A secondary clause of the treaty was probably that the Dominion take over administrative control from Starfleet - also not unreasonable, since Bajor clearly doesn't have the resources to manage it themselves. EDIT: As Tritium21 points out in comments, this is explicitly stated at least once, in A Time to Stand:
Kira: We'd [the Bajorans] would like the station's Bajoran security force reinstated.
Damar: I suppose you want us to give them back their weapons as well.
Kira: [Nods] That's right.
Dukat: The station no longer requires a Bajoran security force. Our troops can handle any problems that might arise.
Kira: The Federation and Bajor always shared equal responsibility for station security. I thought you [Weyoun] said that we would have the same arrangement with the Dominion. After all, we are all friends here, aren't we?
Weyoun: [To Dukat] Perhaps you should reconsider your decision.
Dukat: The order stands.
Clearly Weyoun did promise the Bajoran people that Terok Nor would be a joint venture between the two governments. It's equally clear that Dukat has other ideas, but that's a different issue.
However, later in the episode Weyoun says something else interesting to Jake Sisko:
Weyoun: This is not an "occupation", this is a Cardassian station.
So it's not actually entirely clear what DS9's status is under this non-aggression treaty. As I see it, there are two explanations:
- Bajor surrendered control of DS9 to the Dominion, and the Dominion gave it to Cardassia to govern. This would be a bad thing for Bajor to have agreed to, but in fairness Weyoun is a master manipulator, and Bajor's government is still in its infancy; it's possible he just out-manoeuvred them
- DS9 is a joint operation between Bajor and the Dominion, and Weyoun's remark was a slip of the tongue. This seems the likeliest situation, and is certainly in Bajor's best interests. But Weyoun's comment is hard to reconcile; I don't believe it was a slip of the tongue, because Weyoun is far too crafty. However, I don't have any better explanation