I think it's because Endermen are adapted to living in an environment with no water so their bodies are not adjusted to the existence of water and have no idea how to respond, so their bodies view it as foreign and harmful and activate the pain receptors.