It won’t be considered fraud or illegal. People’s lives change & their need change. They have the right to move around & switch homes.
One thing to consider: in most cases, the purchase of a rental property requires a 30% down payment & higher-than-normal interest rates (i.e. higher interest rate than the rate for a primary residence).