At the end of his trial as described in The Apology, Socrates refuses to give up his philosophizing, as it is only through this that he can do his duty to God and pursue goodness. Only through philosophy can he properly come to know himself, and it is here that he makes his famous assertion that the unexamined life is not worth living.
Socrates' claim that the unexamined life is not worth living makes a satisfying climax for the deeply principled arguments that Socrates presents on behalf of the philosophical life. The claim is that only in striving to come to know ourselves and to understand ourselves do our lives have any meaning or value. Again, goodness is associated with wisdom, making the life of the philosopher—the lover of wisdom—the most desirable life of all. If we refuse to question ourselves and the world, we will act without reason, unable to distinguish between good actions and bad actions. Without philosophy, Socrates might argue, humans are no better off than animals.
The good life is one in which we make both ourselves and those around us happier and better off, and the only way to pursue that life is to pursue wisdom and self-knowledge. If Socrates were to give up philosophizing, he would be abandoning the examined life, and without wisdom or self-knowledge he would be better off dead.