An important benefit of fasting is that it promotes self-control by disciplining our bodies. When we say no to our natural appetite for food, we develop the will-power and discipline to say no to other fleshy desires (1 Corinthians 9:27).
Other reasons people in the Bible fasted include deliverance (Second Chronicles 20:3), mourning the loss of a loved one (1 Samuel 31:13), healing the sick (Psalm 35:13), spiritual strength (Matthew 4:2), and the appointment of elders in the church (Acts 14:23).
Losing weight is NOT the emphasis when fasting for spiritual reasons.