Hazrat Abu Huraira RA narrates that Holy Prophet Muhammad SAW said that he who doesn't quit the practices of telling lie and doing void acts, Allah doesn't need his starving on the name of fasting.
Out of the five pillars of Islam fasting is the one and is observed to sanctify soul, so that the inclination towards virtue and abstention from sin can be developed. Practice of fasting has been obligatory in almost all the Muslim Ummahs. Prophet Muhammad SAW used to observe fasting even before it became obligatory. When the migration was made to Madinah Hazrat Muhammad SAW noticed Jews observing fast on the 10th of Muharram. Muhammad SAW was told about the reason on inquiry that Pharaoh was destroyed on this date and Israelis were liberated, so fasting is observed to celebrate this date; Prophet Muhammad SAW exclaimed then I should be the first observing this fast. So Prophet started observing fast on the 10th of Muharram and asked other Muslims to observe fast too. Later when the fasts of Ramadan were made obligatory the fast of 10th of Muharam was related to voluntary act worship.
Ramadan-fasts have many wisdoms and blessings. There are numerous rewards of fasting. Fasting helps developing sense of piousness and reverence to Allah. Man starts abstaining from bad habits. Starvation from dawn to dusk let a man to develop a sense of consistency too. He realizes about the hunger of poor. A man observing fast becomes pious and finds a tendency towards his Creator.
In this Hadith Prophet Muhammad SAW said that a man observing fast should abstain from doing bad activities besides he avoids edible for Allah needs his piety. One who observes fast and does not refrain from telling lie, cheating and teasing others; such person will get no benefits from his fast. Fast doesn't mean starving but a mean to quit all the vicious acts and to develop inclination towards good acts.
Allah likes the piety of the one who observes fast not his starving; and being pious means having the sense to differentiate between evil and good, between right and wrong, between justice and cruelty. After getting an insight of the difference between justice and cruelty; then a sense to dominate truth, virtue and justice should spark. All the capabilities should be employed for this aim. Separation from the system of evil, vicious acts should be made. If these results are found by the virtue of fasting then the starvation has concluded rightly, starvation has gone in vain otherwise.