What LMI is
Lenders mortgage insurance protects a credit provider if borrowers are unable to repay their loan. It is usually a one off cost to a home loan borrower, payable when the amount borrowed exceeds 80% of the value of the property. LMI does not benefit the borrower, it only protects the lender.1
Read that last sentence twice, because the name works against it. This is an insurance policy you pay for, held by someone else, covering a risk to them. If the loan fails and the property sells for less than the debt, the insurer pays your lender and then has the right to come after you for the shortfall. You have bought your lender a safety net and kept the fall.
None of which makes it a bad deal automatically. LMI exists so that people without a 20% deposit can buy at all, and for many buyers paying it beats spending another three years saving while prices move. It just should not be mistaken for protection.