HIV isn't transmitted this way. In adults, HIV is transmitted via unprotected genital or anal sex, or by sharing IV needles with HIV-infected drug users.
That actually is the reason -- HIV isn't transmitted by having your hair washed. As to why you have dermatitis, your doctor would be best equipped to answer that.