Agahnim wanted to lay the ground work for being a greater man than himself but also so Stefan can impart that knowledge and wisdom to Zelda so she can succeed when she ascends to the throne aswell! Agahnim really did want Stefan to be the greatest wizard to have ever lived, cause of he couldn't...