Let me say this up front: I think leaving a church is the right thing to do at times.
If that church doesn't uphold the scriptures as the rule of faith and conduct;
If that church embraces universalism;
If that church is libertine...
You get the point. There are doctrinal issues that are so fundamental and non-negotiable, that if a line is crossed here, we must cross ourselves off the roll. Even so, I wouldn't leave without a fight. Not an argument or a turf war, but a contention for the faith and for the souls in that body. Don't let them wander off to hell without an effort to save their souls! But if they won't hear, and can't stand on sound doctrine, we have to leave!
Sometimes there is a bone of contention between folk that, given the nature of the personalities involved, just can't be resolved. Leaving is an acceptable (but still unfortunate) thing to do in this case, as long as it is done on reasonable terms, and doesn't result in an unending grudge.
Sometimes, folk are being appointed in the body according to the wishes of the Spirit of God, and leaving one congregation and going to another is precisely what God wants done! It's easy to discern that when we get a new assignment at work and are moved to a distant town; it's not so easy if the change takes place in the same town. Regardless, each of us is a gift to the body and we must understand that God gets to place us where he wishes. To tell you the truth, I wonder how much dissatisfaction people feel in a church is actually just the dissonance in their souls caused by not discerning where God wants them.
There are acceptable, justifiable, and quite spiritual reasons to leave one church and go to another. What isn't acceptable is sucking one congregation dry and then slithering off lamprey-like to suck some other body dry. What isn't acceptable is being corrected, or properly directed and, not liking it, throwing a hissy fit and taking your ball (gift) and going home (or to another "home church"). What isn't acceptable is not having a gracious enough heart to care about what someone else is needing or receiving, and so transferring to Bedside Assembly because you're not getting that much out of it.
There are times to leave a church, there are times when it's absolutely the right thing to do, but it's never something we make up our minds about--it's all about blossoming where God plants us!