It makes perfect sense for an adversarial nation's intelligence agency to undermine the CIA and Americans' trust in their own government.
America is too far away from its rivals and enemies for a conventional war to be fought on its own shores. It makes more sense to use fear (9/11) and propaganda (your CIA is spying on you!!) to get Americans at each other's throats and distracted from the real threats to their wellbeing.
After all, our political parties have been doing that for my whole life, so the groundwork laid is practically an invitation.