TL;DR -- Sometimes, some places, they will
Here's the deal ... it's a big, wide world. In some societies, in some communities, the clergy will take over. In others, they won't, because there are factors which inhibit it. Here are some possible factors:
It's ... against their religion ;D
There are likely many religions out there, with different gods. These gods will have different goals. Might be ministering to the poor. Might be training warriors. Might be blessing the crops. Point being, clerics in this type of setting are granted their powers as gifts from their divinities. If the clerics go against their patron's interests/commands/style, they lose their power. So, in a community where the dominant religion is worship of a love goddess, the clergy is unlikely to strive for political dominance.
There are multiple different religions
There are likely many religions out there, with different gods. These gods will have different goals. Meaning that the clergies of different religions might well spend a lot of time and effort opposing one another (and proselytizing!), which leaves them less time for Taking Over.
There are angry secularists with crossbows
Like it says on the tin. There may be non-religious factions who also desire power, and are willing to fight for it. Their desire for power may be much stronger than the local clergy's, so much so that the clergy decides that fighting for dominance isn't worth it. After all, running the city is probably not their #1 priority anyway.
They're too busy!
The clergy may be too busy ministering/blessing/smiting-evil to bother with "mere" political power.
All that said...
In some country there might well be a God of Will-to-Power. His followers' mission is to seize control of their local city-state. I'd lay pretty good odds on them...