Reading See No Evil (good book, check it out), to paraphrase Robert Baer, the purpose of being a CIA agent is to break laws of other countries. Your goal is to have agents and their recruits give you sensitive information that they'd never have a clue on getting otherwise.
The CIA does some shady things but modern societies need them. It is almost brain-dead to assume that a nation does not depend on effective intelligence. I guarantee you nations like Sweden, Norway, Japan, etc. all have intelligence agencies that do the same things as the CIA. Not that I condone torture or secret prisons, which is definitely overstepping boundaries, even for an organization like the CIA, but to say that abolishing it would be good is extremely idiotic. Nor would I agree to the CIA being some neutered "organization" that can't actually get information due to all the red tape. The CIA just needs strict limits on dealing with potential unfriendlies. Torture is not necessary because it doesn't even give accurate results. So not only is it controversial, it is a waste of time.
It's been years since I read much on the subject, but I doubt the available info has changed that much. In college I was into SIGINT stuff a lot, and I think that mentally I toyed with trying to get in the CIA for a while, so I read a lot of info on it.
The CIA started in a fairly bog standard way. It was basically the continuation of some intelligence groups and projects begun during the course of WWII. In the next 10 or so years, they had plenty of stuff to keep themselves busy with, but at the same time, it was during the genesis that permanent black eyes like MKULTRA happened, and such transgressions appear to have happened regularly ever since.
Being tough to say what went wrong (because its history is ultimately something secret), my guess would be that it was given too much of its own free will during its formative years. Those early years, that first decade when Gottlieb went crazy and MKULTRA happened, they ultimately set the tone for what came after. When one of the earliest parts of your legacy is MKULTRA, there are bound to be problems.
The central American shenanigans, FoC? Not the CIA's fault, exactly. They weren't the only people fucking around down there, and they weren't there by their own volition. Don't forget that the CIA is an org directly tied to the president and cabinet--the CIA can't go rogue and fuck shit up if they want to. They are only as "good" as the people ordering them. This is as true as in the days of Gottlieb as it was in the 70s and 80s.
If you think the CIA is good for nothing, and should be shut down, well, you don't know much about the intelligence game in the world. Intelligence agencies earn their right to exist by the same doctrine that dictated the founding of the CIA in the first place: if our enemies have intelligence agencies, we need one, too. It's not just a matter of "the bad guys have this toy, we wants one too." An intelligence gap means our technology falls behind, and our enemies, with up to date intelligence, can read what we think of as "secret" very easily. Intelligence serves as much a purpose of making sure our shit stays secret as it does finding out other nation's secrets.
Also, FoC, as I said before, things are more muddled today, but the CIA is ultimately not responsible for its own actions. The people that tell the CIA what to do (not the CIA itself) are. The CIA is a civilian group, not a military group, not a law enforcement group. If they say "put together a secret prison," they aren't the ones actually doing it. That is a cross group initiative, which means that some important people must think that it is an acceptable idea.
Basically, FoC, if you know as little about the Department of Education as you do the intelligence community, I think you've just pantsed yourself well and dandy for all to see.