It's not just "you're taxed on gross minus employee salaries minus expenses". If that were the case, then no company would ever pay taxes, because they'd make sure to spend all their income.
Perhaps you could elaborate. In the US, you are taxed (both corporately and individually) on net profits (gross minus costs). For more detailed information, please refer to (googled link provided):
Labor is one of those costs. If you are a C corp, the corporate tax rate is applied after payouts of salary (and everything else), which gives the option of paying out most (if not all) of your proceeds as salary. The salary, in turn, is taxed at the individual tax rate.
Companies make profits so that they can pay some of those profits out to shareholders or expand (as you've pointed out). Regardless, tax is levied BEFORE profits, which is kinda handy for companies. As for needing profits to grow, at least for small companies, that isn't true at all. You could grow from 1 employee to 20 without making a dime. Corporate profits, while nice for the company, are in no way required for small business. Now, if you start talking about banking, lines of credit, and credit ratings of companies, maybe you'd have a point... but if you wear a hat, nobody will notice
The reason that I find this germane to the discussion at hand is the fact that true non-profits shouldn't really be holding onto capital or making a profit. Some of the other comments allude to property tax, which are levied regardless of profits; I suspect that this is the real reason behind tax-exempt status. Other types of taxes which are periodically levied (or some some countries levied WRT gross proceeds) might also be a reason.
If that were the case, then no company would ever pay taxes, because they'd make sure to spend all their income.
If you operate a business, if you intend to cash out any money (e.g. use it for personal use), you are required to pay yourself, which is subject to individual taxes (in the US, anyway). As a matter of fact, MOST companies operate this way, if you're just relying on a count of businesses rather than their earnings.
This is small business in American, and, dare I say, most of these small businesses don't even bother to become C corps, they just operate via the Schedule C form for their taxes, which again, ONLY TAXES NET.