"Whoever controls the wormhole, controls the Alpha Quadrant." Benjamin Sisko.
I suppose the Dominion hoped that by having a non-agression pact with Bajor, they could slowly maneuver themselves closer to DS9 and the wormhole without sending in a huge fleet. However, when Starfleet decided to mine the wormhole, they needed to send in a fleet anyway and take the station before it was to late.
By then, the pact had been signed already, even if only just.