You must be a one in a million person then to be able to have to the ability to reflect upon memories at two years old. I highly doubt you remember jackshit from when you were two, but if you do, you should probably go to a research center so your amazing brain can be studied.
Even IF you could though, you knew what's wrong and right because your parents, or whoever was your caretaker, taught you what's wrong and right.
How can you possibly blame the 2 year old for doing this? He got something stuck in his mouth that made him feel good. What 2 year old isn't going to want to do something that makes him feel good? That's what the brain is designed for at such an early age - maximize pleasure, minimize discomfort.