Amnesia Is Not Just Total Memory Loss
Amnesia does not always wipe your entire past. Depending on where the brain is damaged, you might lose the ability to form new memories while still perfectly remembering your childhood.
Movies often portray amnesia as a complete identity wipe, but it is usually much more specific. Some people lose only the ability to store new information, effectively living in a permanent present. Others retain their skills and habits but cannot recall the events leading up to their injury. It is a complex glitch in the brain that proves memory is built from many different systems rather than one single file cabinet.
Source: Amnesia