Yes, clothes washed in hard water can sometimes develop a peculiar odor. Hard water contains high levels of minerals. When you wash your clothes in hard water, these minerals can interact with the laundry detergent and form soap scum.
Over time, even with the most advanced washing machines, this soap scum can accumulate on your clothes, leading to a musty or unpleasant smell.
Also, the minerals in hard water can reduce the effectiveness of the detergent, making it harder to rinse away dirt and soap residue. This can result in clothes that don’t feel as clean and may have a lingering odor.
I believe that this is one reason why products have been developed by the laundry detergent industry to add extra fragrances to your clothes. One smell to cover up another.