The bathrooms in which people relieve themselves are abodes of the devils, so no one should stay in them except as long as he needs to. Abu Dawood (6) narrated from Zayd ibn Arqam, that the Messenger of Allah (blessings and peace of Allah be upon him) said: “These places where you relieve yourselves are inhabited (by the devils), so if one of you goes to the place in which he relieves himself, let him say ‘A‘oodhu Billahi min al-khubthi wa’l-khabaa’ith (I seek refuge with Allah from the male and female devils).’”
Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
The word translated as inhabited means that the jinn and devils frequent these places, lying in wait for the sons of Adam, to harm them and cause mischief, because they are places where ‘awrahs are uncovered and the name of Allah is not mentioned.
See: Mirqaat al-Mafaateeh (1/386).
An-Nawawi (may Allah have mercy on him) said:
It is mustahabb to avoid places frequented by the Shaytaan. This is the more correct of the two reasons mentioned for the prohibition on praying in bathrooms.
End quote from Sharh an-Nawawi ‘ala Muslim (5/183).
Hanging up clothes in bathrooms has nothing to do with that, so it is not makrooh to hang up clothes in bathrooms, for the reason mentioned above. As for the devils lying in wait to cause harm, that has nothing at all to do with clothes and hanging them up. Rather it is a false claim and a myth like those that become widespread among people.
For more information, please see the answer to question no. 146002.
And Allah knows best.