You forget what you want to remember, and you remember what you want to forget.
The human brain consists of many specialized circuits that evolved to solve specific problems our ancestors faced during our evolutionary history.