When Mondelez International Inc., the maker of Oreo cookies and Cadbury chocolate, suffered a malware attack in 2017, it thought the property insurance policy it had taken out years earlier with Zurich Insurance Group AG would help cover the more than $100 million in losses Mondelez estimated it had suffered.

Zurich saw things differently. The insurer classified the attacks, which also hit servers of several other big companies, including Merck & Co. and A.P. Moller-Maersk AS, as an act of...