Wisdom behind the Prescription of Fasting

1- To establish piety by submitting to the commandments of Allah and responding by willingly complying to His rulings. Allah Almighty says: “So that you may gain piety” (Al- Baqarah: 183).
2- To train the soul to be patient and to empower the mind over its whims.
3- To inculcate in every individual righteousness and compassion towards the needy and the less privileged, as when he feels hunger his mind would be softened, making him milder when assisting the less privileged.
4- To ease the body’s system of its copious tasks and thus ensure a good and healthy bodily function.

https://www.al-feqh.com/en/fasting-s...ngs-and-merits