Relatively few species of spider feature the female deliberately eating the male. It happens as an accident in varying degrees in most cases. In the case of the black widow she eats small bugs about the size of her lover. And she has poor vision & limited brains. So he has to approach her very carefully [in some species he uses his own webbing to tie her down.], and leaves quickly afterwards, to avoid her making a mistake he at least will regret.
One reason for the confusion on the subject is that early researchers would put male and female in a relatively small bottle so they could see what was going on. This also meant the male could not escape, and eventually the female would get confused about him and...
There are a large number of spiders, and a large variety in their sexual habits, which do include some where the male actively offers himself as a meal. But in the normal case, the male expects to survive the encounter.