If I approach this from a CBT perspective then you're not building a habit. Instead you're retraining your mind to place a higher importance on health or physical attractiveness. We can break personal aspirations into different categories ranging from mind, body, spirit... or more specifically -- intellectualism, mental acquity, empathy/compassion, love, friendships, family relationships, spirit, tranquility, peace, relaxtion, etc... We can generally rank these in order of importance from 1-3. 1 being very important, 3 being not important at all.
Prior to this experiment, if he assessed his importance on health and wellbeing, he probably placed it low. Easily a 3. Maybe a 2. After a month or so it may have transitioned to a 2. Either by constant reinforcement of his necessity to go to the gym, or because of an actual change of mind.
Or I'm talking out my ass... I don't know.