In the novel "Of Mice And Men" by John Steinbeck, the author has a female character hang around the bunkhouse of the male hired hands. This character, Curley's wife, is fairly newly married and although we presume she is reasonably financially secure for the times (unlike the insecure nomadic hired hands) still seems unhappy. We presume her husband does not even mention her name around the ranch as she is consistently referred to only as "Curley's Wife" - she has no other identity except as an add-on to him. Her motives for hanging may be mixed: loneliness, boredom,attention seeking to provoke jealousy,increasing self-esteem through male approval, incendiary behavior,neglect at home - all a cry for help!
I assume that you are talking about the part in Chapter 4 where Curley's wife comes to Crooks's room and gets in a fight of sorts with Crooks and Candy.
If so, I think that she comes to visit because she is lonely. It seems like she is always looking for someone to hang around with because Curley does not care about her enough.
As far as why she starts a fight, I think that she does this because she feels like she has no power. Curley has her cooped up on this ranch where she can't do anything. By picking on men who can't really fight back, she gives herself a feeling of power.
In Of Mice and Men, Curley's wife visits and starts a fight for a couple of reasons, one obvious and one psychological.
Obvious reason: Steinbeck wants her to. She's a character, a minor character at that. She doesn't even have a name. She's the only female character in the novella. She's an archetype: a temptress. Temptresses tempt. They tempt men. What else is she going to do? Sing and dance? She's got to visit the bunkhouse, the barn, the stable. She's got to start a fight. These men are animals, and she's just the thing to get their blood boiling. Even when she's not there, she's there starting a fight.
Psychological reason: she's lonely. She wants attention from Curley, but he's not giving it to her. So, she seeks it from the others. There's two new guys, one big and one small, and she's curious. Maybe she wants to make Curley jealous by seeing her talk to the big buy because she knows Curley hates big guys. But that might get her beat up, so I don't think she would want that. So maybe she wants to see Curley beat up someone else.