First of all, to make it more accurate, Ananda was partly enlightened while the Buddha was still alive, he was a Stream-enterer.
One of the reasons that he couldn't become fully enlightened while the Buddha was alive was because he was too attached to the Buddha. Another reason may be that he was too busy taking care of the Buddha for the benefit of others. Sometimes this can slow down the enlightenment process.
Ananda had a wonderful memory and the scriptures that begin with, "Thus have I heard", were passed on by Ananda.
After the death of the Buddha, he wanted to become fully enlightened in time to attend the first council of fully enlightened monks, so that he could share all the teachings of the Buddha that he had memorized. With his compassionate wish, and the fact that the Buddha wasn't around any more, he devoted all his time to his own practice and became fully enlightened before that meeting.