The National Security Act of 1947 which created the CIA charters it for the collection of overseas foreign intelligence. It is specifically forbidden from operating on US soil and cannot, as depicted in the series, operate in any sort of law enforcement capacity.