There are just certain professions where weight comes into play and it does not have to be always losing weight. The pressure to lose weight to fit into something is preposterous, but necessary for those roles where skinny is kind of an understatement. But there are roles where gaining weight is necessary, whether by fat or by muscle.
For actors in those action movies, especially in the superhero world, plenty of strength and body mass needs to be created for the heavy suits and those combat sequences where it is not all CGI people are seeing.
For playing a muscle buff in Pain & Gain, Mark Walhberg ate 10 meals a day, drank protein shakes, and consistently lifted weights.
Exercise regimes are common for actors who have to get very fit and muscular. Consuming protein is one way to do it, as Hilary Swank did playing a boxer in Million Dollar Baby. But for that, one has to adhere very strictly to how much protein they eat, how many calories they consume a day, and how much fat they cut out of their diet.
This will take a few months, not days, to perfect, as Ryan Reynolds did in his six-month preparation for Green Lantern to raise his weight to 200 pounds and only have 8% body fat.
Then, there is the physical part of it, in which exercise is six day a week and it is a combination of weight lifting, running, and deadlifting. Emma Stone did that to gain 15 pounds of muscle to prepare as Billie Jean King in Battle Of The Sexes. Others looked to structural exercises such as squats and deadlifts to construct a six-pack and create upper body strength.
Bradley Cooper went from under 200 to 225 pounds doing all of that for his role in American Sniper.
But, for some roles, it isn’t about the muscle and the upper-body strength, it is just about having a belly after eating a bunch of unhealthy foods. That excessive fat to be overweight is what a role requires Robert DeNiro did this twice for Raging Bull and The Untouchables instead of wearing a fat suit. While there is health concerns by doing this, many actors see it as a more realistic form for the role.
Christian Bale once shaved 120 pounds for one role, but then gained 40 pounds on doughnuts and cheeseburgers, Matt Damon drank beer for his belly in The Informant, and Renee Zellweger put on weight in each of her roles in the Bridget Jones series by eating 4,000 calories a day.
Through physical regimes, strict proteins eating, or open junk food eating, people can gain weight for a role to be very fitting. It is more comfortable than a fat suit to not make it fake.
With physical structure, there are some roles that are meant to be for those of a certain build and actors do go out and gain the weight properly to make the role as believable as necessary.