Showering in hard water can make hair greasy because calcium and magnesium deposits hinder shampoo’s lathering abilities, and causing you to wash your hair more frequently.
But hard water minerals react with the fatty acids in soap, forming an insoluble layer called soap scum. This reduces the soap’s ability to lather, which, in turn, reduces its cleaning abilities.
You may notice that your hair is greasy after washing in hard water because you simply haven’t cleaned your hair as thoroughly as intended with shampoo.