Not to declare people who commit sins, especially rulers who do not rule according to Shariah, is one of the principles of Al-Murji'ah, and not of the people of Ahl Al-Sunnah wa-Al-Jamā‘ah
From the time of Prophet Muḥammad till this very day, the leading Muslim scholars agree that the one who commits sins, even if grave, is considered a sinner for whom we invoke Allah to turn to him to repent and be righteous. None disagrees with this view except al-Khawārij who rebelled against ‘Alī ibn Abu Tālib, may Allah be pleased with him. They opined that Muslims are rendered disbelievers due to committing sins. Moreover, they did not hesitate to declare some of Prophet's Companions disbelievers. No wonder then that these terrorist groups declare Muslims all over the world nowadays disbelievers.
It is noteworthy to remember Prophet Muḥammad's reiterated warnings to Muslims against labeling people infidels. He says, "Whoever says to his brother 'disbeliever' then it will have settled upon one of them." This is a strong warning against accusing people of disbelief.
This allegation proves that these deviant groups always selects and focuses on the distorted or odd examples throughout Islamic history to reach to this erroneous conclusion.