Question:
I prayed to G‑d to lose weight, why am I not a size 2?
Answer:
G‑d listens to every prayer and He responds to every prayer. The beauty of His method is that He allows us room to grow. He never takes away our free choice. He gives us space — space to accomplish things on our own. We have the space to take ownership of our own little world.
When you pray to G‑d, don’t pray to Him to make you a size 2. He’s not going to do that, although He can. Pray to Him for the strength and inspiration to make the right choices.
We’re not spoiled children to make a mess then walk away and leave it for others to clean up. If that were the case, we’d all overeat, then ask G‑d to make us thin again. When would we learn healthy habits?
So be happy that G‑d doesn’t give you off the bat everything you ask for. Be happy that He gives you a life to live as your own person, with your own accomplishments, your own way of doing things and your own size that’s right for you.
See What Is Jewish Prayer? on the Jewish Prayer site.

G-D has given us the gifts of free will and common sense. He is not a robot or slave who exists to do as we command. It is we who are to do as he commands. We must use the gift of common sense and realize that every ounce of excess weight we carry on our body is put there by eating more than we need to sustain our life in order to fulfil our created purpose of glorifying G-D. His mandates or laws are given by G-D for our own protection because he loves us. We were created by G-D and given free will. We were also given self-control. G-D helps those who help themselves is another way of saying self-control. Getting ourselves in trouble and then wanting others to bail us out is not what I believe G-D had in mind when he created us.