why people respect doctors

I can only give some personal perspectives.

I think some respect them for their income, but how about pop stars? Business leaders? Government officials? I feel it's because these other high-flyers get rich by other means than professional knowledge. For the same reason people respect professors and teachers.

An important factor is wisdom, judgement, professionalism (as a service provider). A biologist or astronomer could be knowledgeable and well-paid, but their job duties don't require so much human touch.