In many fairytales, when a bad queen/king (most often queen, why?) needs to get rid of someone, a witch is called; she sells a poison or gives wicked advice and goes away with a sack of gold. She appears just once in every kingdom, so I guess it may be one person, always in travel. That's her. Shabby dress is part of her professional image, a witch must wear rags.