Insurance normally has fine print about those things. Life insurance doesn't pay out for suicide. Fire insurance doesn't pay out if you intentionally burn your house down (the fire department also will investigate because even though it is their job they don't like risking their life fighting fires)

You can get insurance without the above provisions, but it will cost a lot more. Once in a while someone manages to collect on a claim for loss of their expensive cigars after they smoke them - but this is rare and usually not worth the cost.