Optimus Prime knew that the destruction of Megatron was only the beggining of the end of the long, long war he had fought. Hundreds of Decepticons remained alice to threaten the safety of the galaxy. So he continues to train, continues to see that his weapons are as powerful as he can make them, because he knows that one day, he will be called upon to defend Earth against the evil of the Decepticons.