In France, China, and Sudan you can marry a ghost.
In France this began in the military – soldiers were away at war, so women married them by proxy and then found out their new husband had already died. In the 1950s, a woman named Iréne Jodart lost her husband-to-be in a dam collapse. She wrote to the President of France asking for permission to marry him anyway.
She got permission, and soon after posthumous matrimony was added to France’s civil code. You still need the president’s permission, but several hundred people have done this in the last seventy years.
China has ghost marriage too. There are various rationales for this, but the most interesting one (to me) connects to Chinese death customs. Deceased family members are venerated on “spirit tablets” – essentially a shrine to your ancestors. Unmarried women cannot be added to these tableaus, instead being relegated to an inferior position near the door (!). So, if you can marry off a deceased daughter, they can be promoted back to the main table.
In Sudan, ghost marriage is the term for marrying your fiancé’s brother if he died before the wedding. The man is considered to be his dead brother for purposes of continuing the bloodline.