Let's talk about occupancy and why mortgage lenders care about it. It's all about basic human needs and survival. When the chips are down and times get tough, you still need a roof over your head. People tend to protect that roof and let other investments go south.
Mortgage lenders and their underwriters rate risk. They know from experience that second homes and investment properties go into foreclosure more easily than primary residences. To offset that extra risk, the mortgage lender will normally require a higher down payment and/or a higher interest rate.
If you have lied to a mortgage lender and borrowed money for a second home or investment property but signed legal documents indicating that the property would be your primary residence and you get caught, you may face criminal prosecution and incarceration. If you're lucky, the mortgage lender will simply raise your interest rate and demand that you come up with the higher down payment.
What if you intended to live in the property but circumstances beyond your control forced you to move somewhere else? You should contact your lender and explain the circumstances and let them decide if they will allow you to retain the same structured terms.
Lenders are very good at catching occupancy fraud. Never let a real estate agent or a mortgage loan officer give you a wink and a nod indicating that it's no big deal. Mortgage fraud is always a big deal.