Their salary was $100k, of which (say) $80k was returned as a loan from the founder to the company.
This lets the company book $100k of costs on a net cash outflow of $20k. Costs are applied before calculating profit and therefore before calculating taxation due. At a corporate tax rate of 20% that would be worth $16k more than the tax deduction due from paying salaries of $20k.
Tax losses can be deferred until you make a profit in most tax regimes so that $16k will be held over until you need it to avoid paying taxes on the first $80k of corporate profits no matter when they happen.
It may also be possible to essentially sell tax savings to other companies under some circumstances (usually when winding up a company).
Overall this scheme would probably cost money as employment taxes would be due. But that can vary depending on other tax breaks, especially in progressive taxation systems. You may also be able to do something interesting with loan interest repayments which are often subject to tax breaks. Tax codes for Western countries are huge and full of interesting possibilities!