The Allaamah Ibn Baaz (May Allah have mercy upon him) said:
“In the beginning of Islam the hijab was not obligated upon the woman, and she would show her face and her hands in the presence of men. Then Allah legislated it and made it an obligation upon her, (as) a preservation and protection for her from the gaze of non-related men at her and to cut off the source of fitna with her. This was after the revelation of the verse pertaining to the hijab, and it is the statement of Allah (the Most High)
وَإِذَا سَأَلْتُمُوهُنَّ مَتَاعًا فَاسْأَلُوهُنَّ مِنْ وَرَاءِ حِجَابٍ ذَلِكُمْ أَطْهَرُ لِقُلُوبِكُمْ وَقُلُوبِهِنَّ ﴾ الآية)
“And when you ask (his wives) for anything you want, ask them from behind a screen, that is purer for your hearts and for their hearts.”
Even though the afore mentioned verse was revealed in reference to the wives of the Prophet ـﷺـ, yet, what is intended by it is his wives and other than them from amongst the women, due to the generality of the mentioned reason and the meaning therein.
Majmoo’ al-fatawa v. 3 pg.354