When Al Capone finally went to prison, it was not for all of the violence he orchestrated. Instead the Chicago gangster pleaded guilty to tax evasion. The outcome was roundabout, but few would argue it was unjust.

Now another famous Illinoisan, Dennis Hastert, has been sentenced to 15 months behind bars for what might be called a technicality. I am happy that this particular technicality exists.

Hastert, who served as speaker of the House from 1999 to 2007, pleaded guilty to structuring bank withdrawals in relatively small sums in an effort to avoid triggering scrutiny from the U.S. government.

The real reason Hastert is going to prison, of course, is that he sexually abused multiple teenagers as a high-school wrestling coach more than 35 years ago. He used cash that he withdrew — which totaled $1.7 million, according to prosecutors — to buy silence from one of his victims.

By the time Hastert's sexual crimes came to light, the statute of limitations on his abuse of minors had expired. So the feds hit him with financial charges instead.

Some financial privacy advocates contend that banks should not be forced to act as law-enforcement deputies. The argument — prominent in digital currency circles — is that free people are entitled to complete confidentiality in their financial lives.

That reasoning may sound appealing as an abstract principle, but it would deprive law-enforcement officials of tools that are critical for identifying bad actors.

Two related provisions of federal law led to Hastert's downfall.

Between 2010 and 2012, the former congressman made 15 withdrawals of $50,000 from his accounts at three banks. Banks are required to report transactions of more than $10,000 to the authorities, and Hastert's withdrawals led to questions from officials at one of the banks.

Following that scrutiny, Hastert started making $9,000 withdrawals, in violation of a law that bars individuals from structuring transactions with the purpose of evading bank reporting rules.

Without those laws, the former congressman's abuse almost certainly would have gone undetected. Even a change in Illinois law to allow for prosecutions of long-ago sex crimes would have not have been enough, since law-enforcement officials only learned about the abuse as a result of the banking rules.

Hastert spent 20 years in Congress, including eight years as one of the most powerful people in America. It is not hard to imagine that his victims were intimidated by his stature, in much the same way that victims of abuse by Catholic priests were cowed into decades of silence.

"The structuring laws are in place for a good reason: they help law enforcement ferret out serious criminal activity that could otherwise go undetected," prosecutors in the Hastert case wrote in a sentencing memo.

I think most bankers would agree. Sure, many in the industry complain about the substantial cost of complying with these rules. But few would object to the basic idea that banks are different from other sorts of businesses — because tracking the movement of money is a crucial part of law enforcement — and have a special obligation to help catch criminals.

It is true that this type of law gives a great deal of power to the authorities, and that power can be abused. Indeed it has been in some cases. The government has seized money from small-business owners who repeatedly made deposits slightly below the $10,000 limit, without even a whiff of suspicion that they broke other laws.

The proper response is to end those governmental abuses, and to put policies in place to prevent them from happening again. The wrong response would be to repeal laws that serve a legitimate and beneficial purpose.

In the digital age, there are lots of reasons to worry about the erosion of our civil liberties. But decades-old laws requiring banks to report suspicious transactions to the government are not one of them.

These laws are helpful for counterterrorism and in the fight against tax cheats. And while they offend some libertarians, they appear to be doing more good than harm.

In federal court Wednesday, one of Hastert's victims shared his story.

Scott Cross was a high-school senior and the captain of the wrestling team at Yorkville High School when Hastert abused him. Cross, who is now 53, remained quiet for more than 30 years, and even supported Hastert politically during that time.

Coincidentally, Cross pursued a career in banking, and today he works as a managing director at Northern Trust Bank in Wheaton, Ill.

"I've always felt that what Coach Hastert had done to me was my darkest secret," Cross told the judge.

"This decision to appear before you in this very public setting has been a huge personal struggle. In fact, until I actually got up to this podium, I was not even sure I would be able to bring myself to speak to you in this courtroom."

"I want my children and anyone else who was ever treated the way I was to know that there's an alternative to staying silent," Cross concluded. "As deeply painful as it has been to discuss this with my family and with you, staying silent for years was worse."

Those who believe that financial privacy is paramount need to acknowledge the practical consequences of that principle.

In Hastert's case, it would mean putting the interests of a serial abuser ahead of the interests of his victims.

Kevin Wack is an American Banker reporter. The views expressed are his own.