Firstly, if you do this everyday for 3 years and do not train at all for a month, then you lose a huge amount of MANY hours worth of training and hard work .. that's like me running everyday for a month and a bit , and then missing a single day, and seeing all of my hardworking go to nothing.
In this time, you could learn a skill that wont just vanish when you get older, and that can make you money.
Now, I am NOT saying that you should be unhealthy. I.e I am not saying that you should miss gym to be lazy and eat unhealthy, but there are easier alternatives, like running which you can do anywhere to stay fit, or even yoga. Neither of these require huge amounts of money to be splashed on things like protein powders , equipment/memberships, travel expenses to get to the gym, or the diets you have to subject yourselves to of eating nothing but naked chicken 6 times a week every lunch and dinner.
I get that the gains people make can make them feel more confident, but then I ask the question who are you trying to look good for ? At this age, you're not really going to be looking out for a partner or looking good for business meetings, you'll probably be doing mostly independent work where you can sit in a tracky without any need to look sharp. You might get a one night stand here and there if you do look good, but why not focus on sharpening yourself to the best of your abilities mentally, dedicate all of your time to becoming the Arnold of the mental world, using the time to develop hard skills ? You may look like not as good as if you went to the gym ate this point in time, but you can focus on the gym when it's actually important to look good aesthetically.
P.S this isn't asked at people who go to the gym to lose weight as a form of exercise but rather just a curious question for people who go to the gym to get ripped. I also rate your dedication if you are someone who does go to the gym for either purposes.