You think the teacher serving society because if a person is to become doctor only just of teacher?
A teacher contributes to society by educating future generations, including those who will become doctors. A doctor's ability to serve society depends heavily on the quality of their education, much of which is provided by teachers. Therefore, a teacher's role is crucial and contributes directly and indirectly to societal well-being, extending far beyond simply training future doctors. They shape the minds and capabilities of everyone in society, not just those in the medical profession.