Life insurance provides financial security for your loved ones after you have passed away.
Many people choose to buy life insurance because they have people who rely on them for financial support, such as, children, a spouse, parents, family members, or someone else that receives some kind of financial support from the person.
You can buy life insurance and name someone as the beneficiary to receive the proceeds from the life insurance policy upon your death. The money is usually paid out to the beneficiary with no federal income taxes.
The money received from a life insurance policy can be used for any purpose, which may or may not include paying for the insured's funeral, paying off the home mortgage, paying off credit card debt, living expenses, replacing the insured's income, providing for the spouse's retirement, etc.
Here is an article that explains Why do we need life insurance?