It happens, going in in great shape and coming out a rag...but I prefer to stack the odds in my favor. For the original K pouch surgery, I went in as a normal kid of 18...around 120lbs...came out a month later at 89lbs...but that is bowel surgery. 1 Month on I.V. pretty much took me down to a skeleton...but a gained it back...(and back, and back, and back....we won't go there!)
Supplements, healthy nutrition, joy and happiness all play a role...going in with a good attitude helps too...not feeling abandoned or defeated but ready to concur the world and come out swinging...
Belief, prayer (to whatever entity you believe in) and a support system are all major factors in success...no one can scientifically tell you why one person will have a better outcome than another, only that it is a multitude of factors and the more you do beforehand the easier it will be later (or not).