I read that babies tend to remember things instinctively if you keep repeating the action or the word. Studies have shown that babies in the womb recognise and remember voices and sounds even after they come into this world, especially if they find the voice or sound pleasing, for example the voice of their parents. Since the ABC song makes your baby happy, then it's no surprise that he remembers it