So Professor X created a projection of a child bearing his image and this allowed him to get close to Matthew, learning more about him and his unique but deadly powers.
Professor X then lobotomizes young Matthew Malloy so that he couldn’t access all his powers, and made him forgot all his memories of killing his parents. Professor X reasons that this was the only way to keep him alive since the Avengers or SHIELD couldn’t be counted on to help the young mutant.
From – Uncanny X-Men Vol. 3 #25