Some people marry the deceased to appease spirits.
The ancient tradition of 'minghun' or ghost marriage is still practiced in some rural areas. These ceremonies unite two deceased unmarried people in the afterlife or pair a living person with a dead partner to ensure the family line continues.