The charges were shocking: Former House Speaker Dennis Hastert, R-Ill., allegedly had paid more than $1 million in hush money to conceal sexual misconduct and lied to federal authorities. But how the ex-Illinois lawmaker made the millions he allegedly agreed to pay a victim was far less surprising -- it was largely the result of a lucrative trip through the proverbial “revolving door.”

The U.S. Department of Justice announced on Thursday, May 28, that it had indicted Hastert for lying to the FBI about why he made massive cash withdrawals and that he had agreed to pay an individual $3.5 million. On Friday, the Los Angeles Times reported that the alleged payments were made to "conceal sexual misconduct" that occurred decades ago, before his time in Congress.

When Hastert left Congress, he was far richer than when he was first elected. That was mostly thanks to real-estate transactions, including one that drew scrutiny from ethics experts. In 2006, the Sunlight Foundation raised questions about federal funding Hastert helped secure for a highway in Illinois on a piece of property he and a group of investors owned. Hastert made a $2 million profit when the land was sold, according to the Washington Post. He was worth at least $4 million when he left Congress, despite entering with a net worth of less than $270,000.

Two years after retiring from Congress, Hastert became a lobbyist, like many former lawmakers. Federal records show that while working at Dickstein Shapiro LLP, Hastert lobbied his former colleagues on behalf of energy, medical, real-estate, tobacco and for-profit education interests.

His lobbying work for Lorillard Tobacco Company appears have been particularly profitable. Lorillard paid Dickstein Shapiro nearly $8 million between 2011 and 2014, according to the Center for Responsive Politics. A spokesperson for Dickstein Shapiro said Thursday that Hastert has resigned from the firm.

After Hastert left Congress, he offered his services as a motivational speaker, at a rate of $25,000 per speech, according to the Chicago Tribune. Hastert has also held a seat on the board of the Chicago Mercantile Exchange, according to Politico. He resigned that position on Thursday.