IRS Commissioner Josh Koskinen complained recently about Congress cutting the agency’s budget by $350 million in the recent budget deal.

Koskinen warns that taxpayer service will be hurt because the IRS will have to furlough employees and make other adjustments because of the reduction of funding.

The IRS has an impossible job. It is tasked with enforcing a convoluted mess of a tax code that Congress created. Given that task, and the additional tasks Congress has foisted upon it with Obamacare and other laws like FATCA, and its funding levels, it is probably fair to say that cutting the IRS budget is not a priority until Congress simplifies the tax code.

Nevertheless, it is also fair to say the IRS completely deserved to have its budget cut. In fact, the IRS should probably be grateful it didn’t receive an even deeper cut.

The IRS acted illegally when it targeted certain conservative nonprofit groups for extra scrutiny before granting them their rightful non-taxable status. Those responsible for that crime have still not been held to account. Nor has Koskinen made noticeable progress in cleaning up the agency. Instead, it appears as if the IRS is still stonewalling Congress in its efforts to get to the bottom of the situation.

Most IRS employees are dedicated, hardworking, and professional. They don’t deserve to be tainted because of the actions of a few bad apples that used the agency’s power to hurt the cause of groups they ideologically disagree with. Nor do they deserve to have their jobs made more difficult because of the consequences of the actions of the IRS leadership that abused their power.

But those are the consequences when an agency as vital as the IRS behaves in such an underhanded fashion.

This should serve as a lesson to the IRS and other government agencies. If you don’t want your budgets cut in a way that will make achieving your mission even more difficult, don’t break the law and abuse your power.

It should serve as a further wake-up call to Koskinen and the other powers-that-be at the IRS. If you want your agency to receive adequate funding, prove to Congress and the American people that you are fixing the problems you inherited and are restoring trust in an agency that absolutely must be beyond reproach if it is to succeed in its mission.

It is certainly a more becoming way to behave than whining about losing money when you’ve just betrayed the public’s trust and done little to show contrition for doing it.

Tax reform will make the IRS’s job easier, but only cleaning up its internal mess will restore the people’s confidence in the agency.