To write something off means you need revenue to offset. Revenue that would be taxed...
Revenue is rarely taxed, usually only profit is. And it's easy to avoid it.