Seborrheic dermatitis, atopic dermatitis, folliculitis, folliculitis decalvans and scalp diseases in general can cause hair loss even on people who aren't prone to male pattern baldness.
Well it doesn't mean you can't have male pattern baldness too, see a dermatologist. If the diagnostic isn't certain, ask for a scalp biopsy.