. "by it for a purpose not related to the performance of the duties and functions of the state agency or institution or used to provide private residential housing for compensation to members of the public other than students and employees of the state agency or institution owning the property, unless the residential use is secondary to its use by an educational institution primarily for instructiona" . . . .