Company earns $X revenue.

Company pays staff $Y in compensation to earn that revenue.

Company pays other expenses of $Z.

Company does not owe tax on $X, but rather on something closer to $X - $Y - $Z.