Let's try imagining another scenario.
You have ransomware insurance.
You fall victim to a ransomware attack.
You pay US $ 100,000 as ransom.
The insurance company reimburses you the US $ 100,000.
It is clear that financially that is 0.
But from a tax view point, if you cannot count the US $ 100,000 of the ransom as expenses you will be paying some form of taxation on the US $ 100,000 you received from the insurance.