In those days, those who were in charge of all medical processes would have handled everything from healing sick people through preparing the person for the after life. Remember, they did not have the split in functions that we do today. In fact, they would have been priests as well. This was Egypt. Also they were the experts in handling the spices and in the procedures for embalming.
2 And Joseph commanded his servants, the physicians, to embalm his
father, and the physicians embalmed Israel.
בוַיְצַו יוֹסֵף אֶת עֲבָדָיו אֶת הָרֹפְאִים לַחֲנֹט אֶת אָבִיו וַיַּחַנְטוּ הָרֹפְאִים אֶת יִשְׂרָאֵל:
to embalm his father: This involves compounding aromatic spices. —
[From Targum Jonathan and Targum Yerushalmi]
Additionally, we find from the archeological and historical records that the doctors were the ones who took care of the embalming. They were also the priests who maintained the body since they believed that disease was caused by the gods.
Ancient Egyptian Medicine:
The Egyptians held the belief that illness was often caused by an
angry god or an evil spirit. For this reason, the Egyptian doctor was
also part shaman, who performed rituals and recited prayers on the
sick. But, the Egyptian physician was not limited to faith healing as
part of his or her practice. Egyptian medicine became a far-reaching
discipline, encompassing a great many fields. Doctors in Egypt, like
today, were specialists in their particular fields. These fields
included pharmacology, dentistry, gynecology, crude surgical
procedures, general healing, autopsy, and embalming.
It is from the process of embalming, or mummification, that Ancient
Egyptian physicians gained their greatest knowledge of the human