Praise be to Allah.
There is nothing wrong with combining the intention of seeking reward for fasting and the intention of losing weight, although it is preferable for a person to intend his fasting for the purpose of attaining reward only. Losing weight will inevitably happen when one fasts, whether one intends that or not.
As-Suyooti (may Allah have mercy on him) said in al-Ashbaah wa’n-Nazaa’ir (pp. 21-22):
Combined intentions (and motives) are of many types. Firstly, a person may have, alongside the intention of worship, a motive that is not worship but will not invalidate it. One example of that is if a person intends to do wudoo’ or ghusl, and also to cool himself. There are some views which suggest that it is not valid because of that combined intention, but the more correct view is that it is valid, because cooling oneself is something that will inevitably happen, regardless of whether or not that was part of the motive for doing wudoo’ or ghusl. So he did not plan to have a combined intention, and he did not intend to undermine his sincerity; rather his intention was to do an act of worship in a manner or at a time that is prescribed, because one of its inevitable outcomes is cooling oneself. The same applies if a person has the intention to fast, and also has another motive, namely the desire to avoid certain foods for reasons of health. But there is still some difference of opinion concerning that.
For more information, please see the answer to question no. 112075
With regard to giving up sin for fear of what people will say, or because the individual has no motive to commit that sin, or he refrains from it because of shyness before people, this has been discussed previously in detail, in the answer to question number 180814 qv.
And Allah knows best.