The IRS has a complex formula in determining who to audit so secret even the government doesn’t know what it is. This secret is the subject of much debate and some even claim to know the formula. (They also have the secret formula to Coca Cola.)
In my neighborhood if you have an S corporation and get audited, I apologize. The lady who handles S corporation audits at the IRS around here was once an employee of mine. I take full responsibility for my limited role in training her. I am ashamed of my behavior.
But an IRS audit is not really an issue for most people. IRS audits are at all-time lows and do not look to be expanded much in the future. Most audits are not the dreaded visit to the IRS office or the auditor showing up at your place. Most audits are of the correspondence type, where they send you a letter. Correspondence audits are generally narrow in focus and are the result of a misplaced number or a mismatch on the tax return with information the IRS has.