One of the main purposes of marriage is to have children that can be raised to become productive members of the community. Sometimes a husband dies before his marriage has produced children.
It is at sad times like these that yibum or Jewish levirate marriage plays a role.