TL;DR: There seems to be many interconnected reasons for wearing hijab. Qur'an 33:59 gives one of the reasons as "they will be known", and tafsir primarily interpret it as meaning "being recognized as free women". However, this does not eliminate it also implying "being recognized as upstanding" as one of the reasons, which may be considered as implied by "being recognized as Muslim".
Several tafsir interpret this part of Qur'an 33:59 as meaning "recognized as free women":
That makes it likelier that they will be known to be free women and not be molested by being approached. In contrast slavegirls did not use to cover their faces and so the disbelievers used to pester them. -- Tafsir al-Jalalayn, trans. Feras Hamza (sourced from AlTafsir.com)
(O Prophet! Tell thy wives and thy daughters and the women of the believers to draw their cloaks close round them) to cover their necks and bosoms ((when they go abroad). That will be better, that so they may be recognised) as free women (and not annoyed) and not be harmed by the fornicators. (Allah is ever Forgiving) He forgives what they have done in the past, (Merciful) He shows mercy on them regarding that which they will do in the future. -- Tafsir Ibn 'Abbas, trans. Mokrane Guezzou (sourced from AlTafsir.com)
However, there seems to be a bit of a "gray area". To illustrate, we have the following tafsir:
All the great commentators who have passed after the period of the Companions and their immediate followers have given the same meaning of this verse. Imam Ibn Jarir Tabari, in his commentary of this verse, says: "The respectable women should not look like the slave-girls from their dress when they move out of their houses, with uncovered faces and loose hair; they should rather draw and Iet down over them a part of their sheets or outer-garments so that no evil person may dare molest them." (Jami'al Bayan, vol. XXII, p. 33). -- Tafsir Sayyid Abul Ala Maududi - Tafhim al-Qur'an (sourced from QuranX.com)
so it also gives the reason "recognized as a free woman", but which also goes on to say
"... will thus be recognized": will be recognized to be noble and chaste women from their simple and modest dress, and not women of ill repute from whom some wicked person could cherish evil hopes. ''.. are not molested": will not be teased but let alone.
Evidently, this instruction is being given to those women who regard flirtation and stares and evil advances by men as annoying and troublesome and not as enjoyable, who do not want to be counted among ill-reputed, immodest society girls, but wish to be known as chaste and modest domestic women.
It looks like there's more to it than just being recognized as a non-slave, and that being recognized as upstanding is among the reasons to wear hijab. We also have:
The Qur'an says that Hijab has been prescribed for the women so that they are recognized as modest women and this will also prevent them from being molested. -- Zakir Naik
In a (rather inspiring) YouTube video, Aminah Assilmi says that being recognized as Muslim, and consequently being recognized as upstanding, is the main reason Allah has ordained wearing hijab:
The Qur'an itself says why we cover our hair. What does the Qur'an say?
...to identify ourselves as being Muslim. That's number one. That we will be recognized. We put this on; this is an act of truthfulness, alright, so that everybody will know that we are Muslim women; we want everyone to know that we are Muslim women. We are proud of being Muslim women.
But this says a lot too. See, what this tells everyone who sees me is what stands before you is a woman of enormous strength. Enormous courage and integrity. This woman will not lie. She will not cheat. She will not deceive. She will be the best employer; the best employee; the best friend; the best adviser; the best counsellor. That's a Muslim women.
Aisha Stacey at IslamReligion.com seems to concur "The majority of Muslim women wear hijab, to obey God, and to be known as respectable women. (Quran 33:59)"