Senate Banking Committee member Sen. Elizabeth Warren (D-Mass.) questions Wells Fargo CEO John Stumpf last week. (Susan Walsh/Associated Press)

The congressional hearing has gotten a lot of flak over the years. It’s an outlet for political grandstanding. It’s partisan. It’s just another mechanism for whichever party is in control to conduct politically motivated witch hunts. Let’s be honest — nobody really likes congressional hearings.

The past few weeks should serve as something of a vindication: Thanks to a couple of scandal-ridden chief executives, Congress has been able to successfully show that these prosecutorial events have some value: A congressional shaming can lead to some level of public good.

Take, for example, the testimony of Wells Fargo CEO John Stumpf, who earlier this week agreed to forfeit nearly $41 million in performance pay after it was revealed that his bank had set up millions of fake bank accounts under the names of unknowing customers. That revelation came following a brutal hearing before the Senate Banking Committee last week, in which senators derided Stumpf for raking in massive salaries throughout the scandal.

Meanwhile, embattled EpiPen producer Mylan Inc. faced severe scrutiny over the past week after its chief executive, Heather Bresch, testified before lawmakers on the House Committee on Oversight and Government Reform. She quickly received scathing criticism for “misleading” the committee on how much the company makes in profit from its epinephrine auto-injectors, which have skyrocketed in price ever since Mylan began selling the decades-old product.

Both of these examples should lead to some healthy public outrage that might change behavior in the corporate world. (And how fortunate it is for Congress to have these successful moments during an election cycle.)

But don’t get me wrong: Most exchanges during investigative congressional hearings are a thorough waste of time. Lawmakers impatiently run through their allotted time, grilling witnesses on seemingly inconsequential details. They often try to force a “yes” or “no” answers out of witnesses begging for nuance. They interrupt. They insult. Sometimes they don’t even ask questions and instead spend their time chastising the witness.

These hearings are, in the most literal sense, the court of public opinion — and there’s little chance for appeal. Congress can drag just about anybody in front of the CSPAN cameras to interrogate them, and if they don’t comply, they risk being held in contempt of Congress, which can mean jail time.

The purported goal of these hearings is for Congress to collect information that it would use to draft legislation. But ever since cameras were brought into the committee rooms in 1948, they quickly began to serve a second purpose: political grandstanding. In fact, it was the infamous committee hearings on the House Un-American Activities Committee that gave Richard Nixon his national rise to fame.

More recently, Republicans spent two years and 33 hearings — including an 11-hour sit-down with Hillary Clinton — to uncover little new information in the 2012 terrorist attack in Benghazi. They also spent five hours grilling Planned Parenthood President Cecile Richards in what’s been called an “inquisition” into last year’s months-long flap on fetal-tissue sales.

And it’s not just Republicans. Democrats were quick to open dozens of congressional investigations when they took control of Congress under the Bush administration in 2007. It’s not surprising that the casual observer would look on with horror at the increasingly partisan tenor of the nation’s committee rooms.

Every once in a while, though, hearings offer a glimpse of true tact and sincere candor. Rep. Paul Ryan (R-Wis.) had a particularly powerful moment as he tore through IRS Commissioner John Koskinen in 2014: “You ask taxpayers to hand seven years of personal tax information in case they’re ever audited, and you can’t keep six months worth of employee emails?” And when Michigan Gov. Rick Snyder was dragged into the hot seat earlier this year to discuss lead-contaminated water, Rep. Matt Cartwright (D-Pa.) delivered an effective admonition: “Pretty soon we will have men who strike their wives, saying, ‘I’m sorry dear, but there were failures at all levels.’”

Last week’s hearings were similarly boiled down to small two-minute snippets that are shared angrily by people on Facebook. Sen. Elizabeth Warren (D-Mass.) played the starring role, calling for the Wells Fargo CEO to resign and to give back the money he took from the bank’s “scam.”

This is a fascinating power that lawmakers have: Despite all the talk about people hating Congress and dismissing it as broken and gridlocked, it still retains enough respect to levy mass shame. We still eagerly denounced “Pharma bro” Martin Shkreli as he made faces and repetitively pleaded the Fifth before the House Oversight Committee.

We don’t watch these events for new information; rather, they’re a form of political theater. Congressional hearings — or at least, those that get media attention or make an appearance in our Facebook feeds — are no longer seen as tools to develop legislation. They are political tools to influence public opinion.

Read more:

The Founding Fathers’ mistake: They didn’t give us a monarchy.

Imagine there’s no Congress

Don’t trust presidential candidates who can’t trust themselves