The purpose of fasting on Tisha B'Av, which falls this week, writes Rambam, is to inspire us to mend our ways. This is achieved, he points out, by recalling what happened on this day and why. By recalling the sins of our ancestors that brought about the destruction of the Beit Hamikdash
we are shocked into an awareness that we are perpetuating their sinful ways in some manner. The realization that this could lead to tragedy in our own day is the expected catalyst for a return to G-d.
It has already been observed that those who refuse to learn from history are condemned to relive it. We fast on Tisha B'Av and on the other three days connected with national tragedy in order to apply the lessons of the past to securing our future.
Lest we forget what happened, we starve our bodies on these days to feed our souls and gain the inspiration to improve and to secure Israel forever.