What is the purpose of lenders' mortgage insurance?

The purpose of LMI is to protect the lender, not the borrower. It allows the lender to insure itself against the risk of not recovering the full loan balance if a residential borrower defaults on their home loan payments.