Actually it was designed so that Brit intel can spy on Americans and hand then info over to the CIA. Then the CIA pretends it came from a “foreign source”, and that they broke no US law.
But this is a fiction, the conspiracy with foreign intel services to spy on Americans is precisely where the illegality happened. It’s basically the “murder for hire” concept. You don’t escape culpability by HIRING someone to do it for you.
Basically it’s a license to spy on your own people by using a trusted ally to do the deed and then we return the favor by spying on one of theirs.
Quite convenient and there’s no accountability.