In short, mortgage lenders are not permitted to ask you lifestyle questions when you apply for the loan. Lifestyle questions, including when you plan to retire, are not relevant to your mortgage application and should not factor in to if your loan is approved or declined.
I am not sure why the lender asked you this specific question but my only guess is that the lender is trying to be personable or perhaps match you with a specific mortgage program based on your financial goals including your time frame for owning the home.
Mortgage lenders are certainly not required to ask lifestyle questions and you are not required to answer them. The only questions you are required to answer and information you are required to provide are outlined on the loan application.
Additionally, according mortgage regulations, lenders cannot discriminate against applicants on the basis of age, race, religion, nationality, marital status, gender or sexual orientation. For example, a 75 year old applicant should answer the same questions, provide the same documents and submit the same loan application as a 25 year old borrower.
If you do not like the way you are being treated by a lender, including the questions the lender asks, we advise you to change lenders. You can cancel your loan and switch lenders any time before you sign loan documents for a home purchase mortgage, which is usually the final step before your loan closes.
The table below shows shows leading lenders in your area. We recommend that you contact multiple lenders to find one that offers a high level of customer service as well as competitive loan terms including the lowest mortgage rate and fees. Shopping lenders is the best way to save money on your mortgage.
Finally, if you believe that you experienced lending or housing discrimination, we recommend that you contact your state attorney general or the Consumer Financial Protection Bureau (CFPB) to review your situation more closely and to review your legal options. These organizations can also look into claims of discrimination and represent your interests with the lender.
Consumer Financial Protection Bureau (CFPB) Contact Form
Fair Housing Act: https://www.consumerfinance.gov/fair-lending/