Praise be to Allah.
The society of the Sahaabah (may Allaah be pleased with them all) was extremely keen to protect women and cover their ‘awrahs, and a woman is all ‘awrah, as the Prophet (peace and blessings of Allaah be upon him) said. So when a woman goes out she should cover her entire body, even her feet. Hence they used to make a “tail” i.e., a woman would make her garment long so that it would be like a tail behind her, so that nothing of her body would show.
Shaykh al-Islam Ibn Taymiyah said: This is what they did when they went outside the house. But inside the house they did not wear that.
Majmoo’ al-Fataawa, 22/119
What you have said – may Allaah guide you – about her garment getting dirty, is as nothing in comparison with the idea of protecting women and closing the door to evil and fitnah (temptation) in society.
You should note that the basic principle is that women should stay in their houses, as Allaah says (interpretation of the meaning):
“And stay in your houses”
So women should not go out unless it is necessary.
With regard to what you mention about the clothes getting dirty, and that some impurity (najaasah) may get into them, that is possible. This question was raised at the time of the Prophet (peace and blessings of Allaah be upon him). It was narrated that the umm walad [a concubine who had borne a child to her master] of Ibraaheem ibn ‘Abd al-Rahmaan ibn ‘Awf said: I used to drag my ‘tail’ (i.e., let my garment drag along the ground) and I would pass through filthy places and clean places. Umm Salamah entered upon me and I asked her about that, and she said: I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: “What comes after it purifies it.” (Narrated by Imam Ahmad, 25949; al-Tirmidhi, 143; Ibn Maajah, 531. Classed as saheeh by al-Albaani. See Saheeh Abi Dawood, 369).
See al-Muntaqi Sharh al-Muwatta’ by al-Baaji, 1/65
And Allaah knows best.