Sometimes loving your body and accepting is as it is, is the first step towards a healthier lifestyle. As someone who suffered chronic anorexia from childhood and nearly died more than once, fat shaming and constant negativity around any imperfection is far more damaging than loving yourself, whatever size you are.
There should be discussion around healthy portions, healthy food, exercise and a change of language around foods (eg. Not sinful or naughty etc). However, judging someone on weight is wrong and causes far more damage than someone finally taking the steps to love a body they may have hated and felt shame about their entire life. Food is often emotionally connected to things, be it memories of comfort, trauma, neglect, fear, having a ‘treat’. It’s often used as an expression of feeling, through taking more or less than needed. Mental health definitely comes into it in lots of cases, but so do other things like how your family ate, how your friends eat and misinformation about actual health. It’s no healthier to restrict food and many ‘diets’ are not healthy. There is a misunderstanding about many foods and a tendency for the media to pass on that misinformation. Fat shaming is just wrong and blaming obesity on someone learning to accept their bodies doesn’t show joined up thinking in any way. Knowledge around food, exercise and our bodies, good accessible mental health care, less capitalist pushing on food, less fat shaming and media pushing of perfect bodies and incorrect information, less pressure on people from friends and family to look a certain way, understanding connections between what your family and friends eat and what you eat, removal of unhelpful emotional language, calm dinner times without screens and with family talking/parents eating too, better exercise on offer and encouraged etc. Will all have a far bigger effect on obesity than any picture posting someone is happy with themselves.
For a start, your friend may be bluffing and seeking reassurance. If she is loving herself then be pleased for her and stop judging. So many things can cause weight gain, including psychiatric medication (very hard not gain anything on antipsychotics for the majority), pregnancy, thyroid issues, mobility issues, mental illnesses or past trauma... the list goes on. Even recovery from eating disorders, where it can be important to be at the higher end of the scale for physical recovery (yes, there are studies) and where your metabolism lowers so much that you get severe night sweats as your body weight rises in recovery.