Writing losses against profits is not a "loophole", but a fair, integral and necessary part of any tax code worldwide. Taxes are not designed to punish and destroy business.
Just some side-fact: Clinton used the same law (writing losses against profits) to pay less income tax in 2015:
(page 17, last line is a deduction of 700K in fomer losses)







