The lender is concerned that the loan was paid off with borrowed money and thus the borrower has a debt that they are hiding from the lender. It is absolutely routine for a lender to investigate any recent significant financial changes of a borrower to look for ways they might be hiding debt.
It's not unusual for people to receive gifts to help them afford a mortgage. However, this does need to be disclosed to the lender so they can ensure that they are in fact gifts and not an attempt to present a better financial picture than the borrower really has.
Their fear is that you might pay off debt to a family member and default on your mortgage. They need to evaluate that risk.
Imagine if someone had $30,000 in credit card debt and mysteriously paid it off right before borrowing money to buy a house. The lender might reasonably fear that they owe some family member $30,000 and if money gets tight, might continue to pay off that debt to avoid strife in their family and thus have reduced ability to pay off the loan. Or they might put routine expenses on their credit cards to pay off the debt to the family member and run up credit card debt again.
The point is, the lender has to know whether that $30,000 credit card payoff is real (because it came from the borrower's own funds) or fake (because they just borrowed money to do it and have to pay that back). If the lender has a $30,000 debt to a family member that they're not disclosing, created specifically to make their financial situation look better than it really is, that definitely increases the risk the lender is taking.
The same thing is true of any significant recent event that makes the borrower's financial situation appear better. The lender has to determine if it's real or fake.
By the way, if you are going to do something to significantly improve your financial situation, like pay off a debt or receive a gift, it's probably easiest to do it at least 60 days before applying for a mortgage. If it's cash you're receiving (say as repayment on a personal loan you made to someone) ideally have it in your bank account on two statements. That way, there's no issue.