The Good Folk across several cultures are well known for their preference for cleanliness and their strong dislike of people and places that are unclean as well as things, like urine and dirty water, that are similarly unclean. They avoid humans who they judge not to meet their cleanliness standards and on the same side of that coin may be warded off by using the things they dislike. I'll include examples here for illustration.
In England we find Shakespeare in Romeo and Juliet writing about a fairy named Mab - whose name itself references a slovenly woman - who punishes lazy women by matting their hair: "This is that very Mab; That plats the manes of horses in the night; And bakes the elflocks in foul sluttish hairs."
Katherine Briggs, speaking generally about fairies in her 1976 Dictionary of Fairies mentions how dirty water left in a home might be punished by leg injuries or pinching. She also mentions that habitual uncleanness was a trait abhorred by the fairies and one which they frequently punished.
In some Irish folklore dirty wash water was a ward against fairies, keeping them out of a home. In other regions however the opposite effect resulted from not throwing dirty water out, as having it standing in the home allowed fairies to enter. There are several accounts of folklore around the need to call out a warning before throwing out or dumping dirty water, lest the Good Folk passing invisibly by be splashed by it and then seek to punish the person who had thrown it.
Similarly in Scotland there are several accounts of fairies who would appear at a door to ask the household to throw their wash water out elsewhere because it was draining into a fairy place. We can find examples of that in a story from Ulster which relates how the request by the fairies was usually quickly complied with, and another which mentions that the fairies were not to be annoyed and dirty water had to be carefully disposed of.
Urine, like dirty water, offended the fairies* and also acted to keep them away. In Ireland urine was used to drive off a changeling, and we have accounts such as that of Bridget Cleary, where the presumed changeling was doused in urine with the idea that it would cause the fairy to flee and force the return of the stolen human.We have this from county Kerry, discussing the use of urine as a protection:
"To keep the fairies away from stealing or harming children the mothers washed them in urine and then the good people would not come near."
"Many years ago there was a woman living near Kilfinane and she had an only daughter who was very handsome. One morning when she was going to school she was passing through a field in which there was a lios [fairy fort]. When she was passing the lios a beautiful red haired woman stood in front of her and took her in to the lios to mind her child. And in the evening when the other children came home from school she left her go. The following morning the same thing happened and was going on for a number of days and the girl never told her mother about it but the mother noticed that her daughter was getting delicate. One day a neighbour came to her and asked her what was wrong with her daughter that she wasn't going to school. The mother said that her daughter left the house every morning to go to school, but she said that she noticed her getting delicate and not eating her food like she used to. So she asked the little girl that night about not going to school and where was she spending the day and the little girl said "Don't blame me mother I was called by a lovely lady and she took me into her house to mind her baby for her and when the children used to be coming home from school she used let me go." Her mother was very worried and did not know what to do. So she went to an old woman who was a neighbour of hers to get her advice. And the old woman told her to tell her daughter to ask the lady what cure was there for a pet calf that would be pining away. And the next morning the little girl asked the lady for the cure and she told her to tell her mother that the best cure was to wash it in urine for nine morning, so when the little girl came home she told her mother what the red haired lady said. And the mother went and told the old woman about the cure. Then the old woman told the mother to bathe her daughter next morning in the urine. And she did. When the girl was passing the lios the next morning in her way to school she was met by the lady who told that she couldn't interfere with her anymore."