Well, I think you have some misconception about Hijab. Hijab has a lot of reasons as mentioned in Qur'an and Sunnah.
First, it is an act of obedience
The Hijab is an act of obedience to Allah and to His Messenger Muhammad (Salallahu alayhi wassalam)). Allah says:
"It is not for a believer, man or woman, when Allah and His Messenger
have decreed a matter that they should have an option in their
decision. And whoever disobeys Allah and His Messenger, has indeed
strayed in a plain error." (Qur'an 33:36)
Indeed,, Allah ordered that women must put on the Hijab.
"And tell the believing women to lower their gaze (from looking at
forbidden things) and protect their private parts (from illegal
sexual acts, etc.) and not to show off their adornment except what
must (ordinarily) appear thereof, that they should draw their veils
over their Juyubihinna." (Qur'an 24:31)
Second, the hijab is iffah (modesty).
Allah made the adherence to the Hijab a manifestation for chastity and modesty:
"O Prophet! Tell your wives and your daughters and the women of the
believers to draw their cloaks (veils) over their bodies (when
outdoors). That is most convenient that they should be known and not
molested." (Qur'an 33: 59)
In the above Ayah there is an evidence that the recognition of the apparent beauty of the woman is harmful to her. When the cause of attraction ends, the restriction is removed. This is illustrated in the case of elderly women who may have lost every aspect of attraction. Allah made it permissible for them to lay aside their outer garments and expose their faces and hands reminding, however, that it is still better for them to keep their modesty:
"And as for women past child-bearing who do not expect wed-lock, it is
no sin for them if they discard their (outer) in such a way as not to
show their adornment; but it is best to be modest and Allah knows and
sees all things provided they do not make a display of their beauty;
but it is best to be modest and Allah knows and sees all things."
Thirdly, hijab is Eeman (faith).
Because, in the verses Allah refers to them as,
"And say (O Muhammad (salallahu alayhi wassalam)) to the believing
women." (Qur'an 24: 31)
The hijab is for the believing women and it is a manifestation of their faith and helps them remain steadfast.
The Prophet (salallahu alayhi wassalam) also said:
"Any woman who takes off her clothes in other than her husband's home
(to show off for unlawful purposes). has broken Allah's shield upon
her." Collected by Abu Dawoud and At-Tirmidhi who said: it is a good
So, hijab is a shield that Allah has given and ordered for women.
And Hijab is righteousness,
Allah says in Qur'an:
"O Children of Adam! We have bestowed raiment upon you to cover
yourselves (screen your private parts, etc.) and as an adornment. But
the raiment of righteousness, that is better." (Qur'an 7:26)
Hence, wearing hijab is an act of taqwa (righteousness).
Source: Why Hijab?