The income tax is a tax on net income, so tax deductions are allowed for business expenses, such as salaries, rents, and interest (though some liberal commentators complain about businesses deducting their interest expenses paid to a bank).
In order to prevent people from deducting every type of spending, the tax deduction must be for a business and not for a hobby or not-for-profit activity.
In the landmark case of Phillips v. Commissioner [pdf], the Tax Court concluded the taxpayer's bowling activities were not a for-profit business activity. As a result, the taxpayer could not deduct his $30,000 of annual bowling expenses against his regular salary from being a full-time postal worker.
The Tax Court found that the taxpayer did not conduct his bowling activity in a business-like manner, did not maintain accurate books and records, and did not attempt to improve the activity's profitability by research or coaching. While the taxpayer did earn some money initially from bowling tournaments, he did not win any tournament for most of the later years. It did not help that Mr Phillips derived some "recreational benefit from his bowling activities."
In general, taxpayers who try to deduct expenses from their money-losing businesses should be careful that the business does not look too much like an enjoyable hobby that the taxpayer would continue to do in the absence of a profit, like horse racing or bowling. Activities that are unlikely to be considered recreational hobbies include drywall construction, sewage plumbing, and preparing tax returns.