I am not making excuses for a person to get fat, I am just stating a scientific fact. If you want to stay in the same shape you are when you was 20 when you are 40, you will have to cut more calories or exercise more.
For example, If I am 200 pounds, eat 2500 calories, workout 3 times a week and this mantains my weight when I am 18. However, you will have to reduce your calories to 2000 or workout 5 days a weight when you get to 40 or 50. If you maintain what you are doing than you will gain weight.
Look at Shaq and Shawn Kemp having problems when they got older, they play ball everyday, workout, and still gained weight. Shaq was used to eating what he wanted and not putting on anything but that changed when he got older.