The opposition may not have much power right now but they'd have none at all if the military took over so it's all about theit survival instinct.
My point was, if Erdogan is such a threat to democracy, how come his political opponents -- such as the pro-Kurdish HDP and leftist parties -- didn't support this military coup, which was allegedly in favor of liberty and secularism and everything good that Erdogan seems to be against? Maybe these opposition parties were aware that military coups are seldom democratic, are often followed by arbitrary imprisonment and summary executions, and maybe it wasn't obvious that this rebel army faction was a better and more democratic alternative to Erdogan?
If they support the coup, this undermines their legitimacy, and in the likely case that Erdogan wins, they will immediately be purged, along with the coup planners. Of course, that can happen regardless.
There's an old Soviet joke about this - three men are in a cell, and try to figure out why they are there. It turns out that one criticized a minister, another praised that same minister, and the third is that minister.