In the case, a Minnesota man took out a life insurance policy to benefit his then spouse and children. The couple divorced, but the man did not change the policy beneficiary. Minnesota later passed a law removing ex-spouses from the policies.
The man passed away and the ex-spouse sued to get the benefits, on the grounds that the law was in violation of the Constitution's contract clause. The Supreme Court disagreed and upheld the law.
There are, of course, cases where someone might want an ex-spouse to receive benefits.
An estate planning attorney can advise you in creating an estate plan that fits your unique circumstances, including the laws of your state of residence and the impact on life insurance.
Reference: SCOTUSblog (June 11, 2018) "Court rejects constitutional challenge to state law on life insurance policies."