It also is to learn self-discipline and self-control. If you can stop yourself from eating what is permissable then you can definitely stop yourself from committing acts that are prohibited. Its not only restraining yourself from eating, but from other desires. There are three people who's prayers are accepted, and one of this is the fasting person when they break their fast. And on the Day of Judgement, the fast and the Qur'an will intercede for a person.
By fasting you achieve self -restraint, change of habit, health improvement, patience, extends your outlook (like Bone is saying) and it strengthen ties between family, since you have the morning meal together, you break the fast together and you pray together. I think this is what Bone is saying when he/she means you learn a lot from religion.