Joe likely asked Rosasharn to tie her hair back in a rag for a few possible reasons:
* Hygiene: The Joad family and other migrant workers were living in very unsanitary conditions. Keeping hair tied back would help prevent the spread of lice and other parasites.
* Practicality: Rosasharn was pregnant and also helping with a lot of the chores and work required to survive. Tying her hair back would keep it out of her face and make things easier.
* Conformity: During the time of the Great Depression, women often kept their hair tied back or covered for modesty and practicality. This would have been seen as more appropriate, especially in the eyes of the locals.
Without more context, it's impossible to say for sure why Joe asked Rosasharn to tie her hair back, but these are some of the most likely explanations.