Taxes apply to profits.
Profits are revenue (money coming in) minus expenses (money going out).
Lets say your lemonade stand profits are taxed at 10%. You sold $20 worth of lemonade (revenue), but also had to spend $10 to restock on lemons and sugar(expenses), you’d have $10 in profits. Taxed at 10% you owe $1 in taxes, resulting in $9 you get to take home.
The next day you still make $20 but end up having to throw away $10 of your lemon stock since they started to grow mold. Now your revenue is still $20 but your expenses are also $20, resulting in net profits of 0. 10% of 0 is 0, so you owe 0 in taxes that day and take home 0 dollars.
Clever accountants often try to write their books to count as much expenses as possible because every dollar they do so is a dollar that isn’t counted as taxable profits, but the principle is to not charge people for money they lost.
Latest Answers