Sometimes when homeowners let thier policies lapse the mortgage company will get a policy that is called "forced place insurance". Those polices are obtained by the mortgage company to protect thier interest in the house but you still pay for it. They will increase your mortgage payments to offset the cost. Remember, forced place insurance only protects the banks interest even if you are the one paying for it. It is always better and almost always less expensive to shop around and purchase your own policy. You get way better coverage for a lot less.
People used to buy mortgage insurance, a type of life insurance, that would pay off the mortgage in the event that the owner, or, in the case of a married couple, one of the owners, passed away, but that is not done any longer. I would recommend homeowners have enough life insurance to ensure their families can continue to pay the mortgage, or to pay off the mortgage, in case of their passing but, again, the insurance is paid by the homeowner, not the bank.
So, I guess the simple answer to your question is no, LENDERS don't buy insurance on mortgages, but they DO require OWNERS to.