I would say that Professor Oak knows your name because he secretly bypassed the door flame that was underneath the ceiling of the grass, allowing him access to means that he could use to slingshot himself around the earth at such a speed that he would go back in time to the moment just before your birth, so that he may use manipulative packaging techniques to send subliminal but controlling brainwaves into your mother's mind, causing her to want to name you something different than what you're named right now, which enables him to name you whatever he wants to name you. Concordantly, however many years into the future, when you surprisingly heard your name uttered from the sneaky lips of the dastardly professor Oak, it was not actually your real name that he spoke, but the name you thought was your real name: the name Oak chose for you when you were born.