Surgery isn't just a doctor cutting on you. It's putting your body under incredible stress. The only reason people don't go into serious shock during surgery and after while healing is because you're being taken care of by medical professionals. There's a reason there are some surgeries that require hospital stays. They have to make sure your not going to shut down and die.
That said, the healthier you are, the easier it is on your body to go through something so traumatic. Even if you're 100 pounds overweight, if you have a super healthy diet and cut out processed sugars (soda) and abstain from drinking and smoking a month or two before and after the surgery, you're setting yourself up to do much better with recovery than a person who's only 50 pounds overweight and doesn't eat healthy and drinks/smokes.