Depression. Insecurity. Addiction. Fear, maybe? You and I may see the logic that fit = healthy = good, but that doesn't mean that everyone else does.
If you're talking about someone who has battled weight since childhood, it can be difficult to completely change your lifestyle. Even if you know it's the smart choice.
If you're talking about someone who has a history of being healthy and in decent shape but suddenly puts on excessive weight (for non-medical reasons, as stipulated in your question), it is likely that there are emotional issues behind it. Perhaps food replaces smoking, or another addiction. Or depression and insecurity can convince someone that they don't care about their health and appearance, or don't deserve the happiness that comes with a healthy lifestyle. I can actually think of two people (a relative, and my friend's husband) who, I suspect, subconsciously keep the weight on as a method of mitigating their social anxiety issues -- the weight acts as a built in excuse both to avoid social situations and to dismiss criticism or rejection when meeting new people (they don't like me because I'm fat, which means they're shallow and not worth my time, so who cares?).