When President Barack Obama named James Comey director of the Federal Bureau of Investigation in 2013, many of the president’s supporters applauded the choice. As potential FBI directors go, the thinking went, the guy was pretty liberal. Earlier that year, he had signed an amicus brief calling for the Supreme Court to overturn California’s anti-gay Proposition 8 and legalize same-sex marriage. He was famous for a 2004 standoff with top White House attorney Alberto Gonzales at the bedside of ailing Attorney General John Ashcroft. Gonzales had tried to pressure the incapacitated AG to sign off on a domestic spying program, but Comey intercepted Gonzales in the hospital room. The document was never signed and Comey threatened to resign if the program continued without reforms.

It’s a neat, heroic story. But it’s probably not why Obama tapped Comey for the top FBI post.

Comey shares two of the Obama administration’s most consistent and unnerving legal leanings: a proclivity for mass surveillance and an aversion to Wall Street accountability.

After the hospital showdown, Comey co-authored a legal memo modifying the Bush administration’s domestic spying program that authorized the wiretapping of millions of Americans without a search warrant. It was fine for the administration to directly violate a law passed by Congress, the memo reasoned, because as commander in chief after “a foreign attack on the United States,” the president has “inherent constitutional authority” that “Congress cannot curtail.” This inventive rationale not only allowed the program to proceed, it helped protect its architects and implementers from prosecution. Who could blame the intelligence community for doing something the top administration lawyers had assured them was legal?

Obama has consistently frustrated civil liberties advocates by following his own aggressive surveillance activities, based on an expansive view of executive power. Back in 2013, Attorney General Eric Holder came under fire after the Justice Department secretly seized the phone records of Associated Press reporters who, the administration maintained, had disclosed classified information in a story.

That scandal raised major First Amendment questions, but it faded after The Guardian and The Washington Post reported that the government was collecting enormous amounts of data on the phone records of millions of Americans, not just journalists. When pressed about the collection effort by Congress, Director of National Intelligence James Clapper publicly lied ― and still kept his job. In 2015, ProPublica and The New York Times reported that Obama had significantly expanded upon the Bush administration’s warrantless surveillance of internet activity and email.

If Obama wanted to invoke novel legal theories to pursue mass surveillance, then Comey was a pretty solid bet. But another aspect of Comey’s resume may also have comforted the Obama administration. In 2010, he took a job as the top lawyer at Bridgewater Associates, the largest hedge fund in the world, with over $150 billion in assets under management. In early 2013, he briefly accepted a post on the board of scandal-plagued British bank HSBC, which he gave up for the FBI job.

“It is not that surprising that a former hedge fund general counsel is more interested in dedicating the FBI’s scarce resources to scrutinizing Clinton’s emails than investigating whether there were crimes committed during the run up to the financial crisis,” Jeff Hauser, director of the Revolving Door Project at the Center for Economic and Policy Research, told The Huffington Post.

The White House and the FBI did not respond to requests for comment.

Bridgewater has long been known as a strange place. Its founder, Ray Dalio, describes himself as a devotee of “radical transparency” ― which in practice means recording just about everything his employees do. In 2011, New York Magazine concluded Bridgewater is managed “like a cult.”

Bridgewater employees are officially encouraged to directly question anyone, no matter what their rank, no matter what the issue, at any time, in order to tackle problems head-on. Comey liked the atmosphere of constant recorded confrontation. “The mind control is working,” he joked to The New Yorker in 2011. “I’ve come to believe that all the probing actually reduces inefficiencies over the long run, because it prevents bad decisions from being made.”

Not all bad decisions, apparently. This year, Bridgewater investment adviser Christopher Tarui filed a sexual harassment lawsuit against the hedge fund calling it a “cauldron of fear and intimidation.” Tarui’s boss had been pressuring him for sex for more than a year, but Tarui kept silent for months, he said, out of fear that the radically transparent firm would not keep his complaint private. When he finally did complain, Tarui alleged, the company pressured him to rescind the charge and eventually suspended him. The allegations in Tarui’s suit took place well after Comey had left the firm, but illustrate long-standing problems with the company’s culture.

Bridgewater ― which did not respond to a phone call requesting comment for this article ― settled the suit in August. But the case set off a string of legal problems for the company by revealing that the firm’s internal transparency transforms into radical secrecy beyond its walls. Bridgewater has long required its employees to agree to a set of strict terms when they are hired, as the New York Times has reported.

Workers are barred from divulging Bridgewater secrets ― they can’t even disclose their pay to anyone beyond immediate family members and lawyers. They are barred from publicly criticizing the company and from taking jobs at other hedge funds for two years after leaving, creating a major disincentive to quitting. Another clause forces disgruntled employees to submit to binding arbitration to resolve problems with the company, waiving their right to a jury trial or a class-action lawsuit.

The National Labor Relations Board is currently reviewing many of Bridgewater’s employment clauses, and a hearing on the contracts is scheduled for December.

But work at a weird hedge fund wasn’t disqualifying in an administration that had long made clear it was not interested in prosecuting financial crime. The Obama administration has settled billions of dollars in cases against big banks for everything from rigging energy markets to illegally foreclosing on homeowners, but top executives have avoided prosecution. Even when banks themselves pleaded guilty to felony tax evasion and interest-rate-rigging, the Obama administration declined to prosecute the actual bankers involved.

And Comey has been around for three years of the blind-eye operation on Wall Street misconduct. After he gave his July press conference detailing Hillary Clinton’s mishandling of classified information and his decision not to prosecute, Sen. Elizabeth Warren (D-Mass.) sent him a letter asking for parity. Why not release records from all the Wall Street cases the FBI decided not to pursue? Comey has not responded.

In retrospect, Comey’s standoff with Ashcroft seems to foreshadow his Friday decision to broadcast the discovery of new Clinton-related emails he has not read. Then as now, he claimed to be taking a risky stand to defend his convictions ― but for what? In 2004, Comey was still okay with mass warrantless wiretapping. On Friday, he planted a flag for (radical) transparency that undermined the FBI’s credibility, and maybe even the integrity of a presidential election. The trouble is not merely Comey’s grandstanding on behalf of his convictions, but the fact that his convictions have proved so bizarre. Obama doesn’t share this latest round of moral strangeness with Comey. It’s a shame they share so many others.