When Socrates, in Plato's Apology says:
The unexamined life is not worth living.
he is arguing that to do the good and to have a good life one must know what the good is. Without examining one's life, and whether what one seeks and desires are merely instrumental rather than ultimate goods, one cannot even know the good at which to aim, just as one cannot know how to get to Piraeus with first knowing where Piraeus is located.
The examined life, because it is one in which one knows the good, is the only possible moral life, because without knowledge of what is good one cannot be good. Thus Socrates also says:
“The only good is knowledge and the only evil is ignorance.”