Hi,
Dandruff is a manifestation of seborrheic dermatitis. At this point the cause of
seborrheic dermatitis is vaguely known. Malassezia
yeast has been associated with seborrheic dermatitis but the exact cause of the condition is yet to be defined. Given this, what you have is still hair loss with scalp disease as dandruff is a disease. Your physician is treating you in the line of a fungal infection hence, the intake of oral medications.