Erasing memory is an important function of mind
For example if a person lives for fifty years, billions of memories will be formed in his mind. If he were to remember them all he would go mad. So he remembers what ever is meaningful:
Memory of our past life have been prevented by nature. There is a reason for it. It is necessary that in the over all system of one's life one forget most of the things that happen to him every day. Similarly we don't remember all the memories that we create during our lifetime. However, that which you don't remember is not erased from your mind. Only the connection between your consciousness and that memory is severed.
For example if a person lives for fifty years, billions of memories will be formed in his mind. If he were to remember them all he would go mad. So he remembers what ever is meaningful: what so ever is worthless he slowly forgets.But your forgetting does not mean the memory is completely wiped out. If merely slips out of your centre of consciousness and is stored in some corner of your mind.
Buddha has given a very significant name to this storehouse. He calls it alaya vigyan - the store house of consciousness. It is just like having an attic or a basement where all the unwanted things are stored. Even though the objects are out of the site, this still remain present within the house. Similarly, your memories goes out of site, but remain accumulated in some corner of your mind.
It will become difficult to live if you ever to recall all the memories of even this life. In order that the mind stays free to handle the events of the future, the past has to be forgotten. Since you forgot what happened yesterday, you become capable of living the tomorrow. This way the mind goes on becoming empty, it is able to look ahead. In other to look ahead it is necessary to forget the past. without forgetting what has already occurred you would not have the capability to see what is ahead of your.
Every day a part of your mind must become blank so that it can receive new impressions, otherwise how can it work? As the future arrives, the past disappear every day. And as soon as the future becomes past it, disappears too so that we are free to receive what lies ahead. This is how mind functions.