A significant number of spiders experience cannibalism associated with the act of reproduction.

An excerpt from the article 28 facts about spiders

Most often, it is the male who falls victim to the female - usually during or after copulation. Cases where a male eats a female are extremely rare. There are species where in up to ⅔ of cases the male is eaten by the female. In turn, the roles are reversed among water spiders (Argyronetia aquatica), where males often eat smaller females and copulate with larger females. In Allocosa brasiliensis spiders, males eat older females whose reproductive abilities are no longer as good as those of younger ones.