How can a person be a beneficiary of a life insurance policy if the spouse of the deceased is still alive?

In rare cases, a person will make a close friend or relative the beneficiary of their life insurance policy instead of their spouse.