MANHEIM, PA - OCTOBER 1: Republican presidential nominee Donald Trump attends a campaign event on October 1, 2016 at the Spooky Nook Sports Complex in Manheim, Pennsylvania. Recent polls show Trump's rival Hillary Clinton with a narrow lead in the state. (Photo by Jessica Kourkounis/Getty Images)

According to the New York Times, Donald Trump declared a $916 million loss on his 1995 tax returns -- which could have allowed him to legally avoid paying any federal income taxes for 18 years.

The loss stemmed from Trump's investments in the early 1990s.

Ordinary investors in Trump's business empire saw the value of their shares plunge to 17 cents from $35.50, bondholders got pennies on the dollar, and scores of contractors went unpaid.

But Trump got a bonanza because the tax code allows "net operating losses" to cancel out taxable income in future years. And the bankruptcy code allows wealthy people to stiff the people they owe by reorganizing their debts under Chapter 11.

Trump didn't do anything illegal. Real estate losses are notoriously easy to create. Trump bought buildings with borrowed money. He could then deduct interest paid on that debt. On top of that, he could take depreciation deductions, even when his real estate was appreciating in value.

Presto! Trump claimed almost a billion dollars of losses that would cancel his gigantic income gains for years to come.

Bankruptcy is also easy to utilize, if you're wealthy enough to find a good bankruptcy lawyer who can use the bankruptcy code repeatedly to shelter your fortune and avoid paying your debts. Trump has used bankruptcy to stiff his creditors at least four times.

The real scandal here is that Trump and other hugely wealthy people can get away with this, and do so all the time. It's just another way the system has been rigged -- by rich people who buy off politicians to alter tax, bankruptcy, and other laws and regulations to their advantage, just like Donald Trump has done.

"As a businessman and a very substantial donor to very important people, when you give, they do whatever the hell you want them to do," Trump told The Wall Street Journal in July 2015. "As a businessman, I need that."

Trump isn't and was never a smart businessman. He was and is smart at gaming the system. There's a difference.