That is exactly how it works. You already spent X on an asset. If you throw the asset away, then you just have deductible expenses.
Same for the widget factory. You can deduct the material and factory expense of making of making defective widgets. If you trash them, you write down the value of your assets.
>But we shouldn't have a tax law that does that, because that's a huge waste of society's resources (materials for the widgets, fuel for the incinerator, people's time and labor).
This is the crux of things. Those arent society's resources, and never were. They are resources of the warner Bros and the widget factory.
Tax law isnt and shouldn't be about forcing people to do what you want. If someone wants to waste their time and resources, that is their choice.
It seems like this whole thread is people angry that they dont own the property of others, and get to control them.