Um... the authoritarians were the bad guys...
Many of the Avengers supported the authoritarians. Thus the ‘civil war’.
What? Ironman, War Machine, Spiderman, Black Panther and kind of Black Widow were fine with signing over control of their freedom to the UN. The UN are the bad guys.