Resolving disputes within the church has at least some biblical foundation, notably in the writings of Paul. Although many believers pay little attention to Paul's distaste for lawsuits when it suits them, his injunctions are raised every time there is a dispute within a Christian church. Troublemakers are accused of being factious and taking matters to court in violation of Scripture. Merely questioning the authority of those who purport to wield it is, according to some interpretations, a grave offense to the Almighty.
Also, courts generally do not get into the business of settling religious disputes. If two parties have an available resolution process within the church (typically having a decision maker who has authority over both parties), then the courts let the church handle its own business.