This long quotation is from here.
“Islam wants the human dress to be free from all those symbols of idolatory and polytheism which have been adopted by any religious sect. These would include the Cross, the Hindu cross thread, pictures, and other un-Islamic emblems. Besides introducing these ethical and cultural reforms, Islam thinks it necessary that the Muslim’s dress should have some distinguishing mark so that they do not get mixed up with non-Muslims, are able to recognize fellow Muslims easily, and succeed in cementing the bonds of their social life. No specific mark or symbol has been recommended for this purpose by Islam. The matter has been left to be determined by the people themselves. When the Islamic Movement got under way in Arabia, the Prophet and the other Muslims used to wear the customary national dress of Arabia. But the Prophet wanted the Muslims to be distinguished in appearance from non-Muslims, so he instructed them to wear turbans along with caps (Abu Dawud, Tirmidhi, and Mustadrik contain the following tradition; “That which sets us off from polytheists is caps with turbans”. This tradition has led some to suppose that wearing caps with turbans is a sunnah and so constitutes a permanent law to be universally observed by Muslims. But this is a misunderstanding. The sunnah simply is that the Muslims, when they are living amidst a nation consisting chiefly of non-Muslims, should in some way distinguish their dress.)”