Steinbeck essentially wanted to create a story about two humble working men who dreamt of owning their own farm, ending with one killing the other out of compassion and destroying the dream. The author created Curley's wife to serve as the catalyst. He gave her the character traits she needed to fill the role of both cause and victim. She is young, sexy, and flirtatious. Her self-revelation to Lennie in the barn suggests that she is young and slender for Lennie to kill her so easily by shaking her. She also has to be very young and naive not to sense that Lennie could be a dangerous person to flirt with.
Her youth is emphasized by the fact that several men refer to her as "jailbait," meaning an underage girl with loose morals who can get a man sent to prison for statutory rape.
One of the men asks George, "Seen the new kid yet?"
"What kid?" George asked
"Why, Curley's new wife."
The fact that he calls her a kid suggests that she must be quite young.
Steinbeck wanted the reader to feel some sympathy for this girl but not so much sympathy that the reader would lose identification with Lennie and George, who are the main viewpoint characters. Therefore Steinbeck uses several strategies to keep the reader from becoming overly emotionally involved with the girl. For one thing, he never gives her a name but only refers to her as "Curley's wife." He also stages her death in such a way that she seems to be bringing it on herself. She seeks Lennie out in the barn. She flirts with him. She moves close to him and invites him to stroke her hair. Most significantly, she creates a very bad impression of her character when he intrudes into Crooks' room and, after refusing to leave, threatens to accuse Crooks of molesting her.
"Well, you keep your place then, nigger. I could get you strung up on a tree so easy it ain't even funny."
This exposure of the cruel side of her nature is pretty obviously intended to modulate whatever sympathy the reader might feel for her when she is killed. There is also Candy's angry outburst when he is left alone with her dead body:
"You God damn tramp," he said viciously. "You done it, di'n't you? I s'pose you're glad. Ever'body knowed you'd mess things up. You wasn't no good. You ain't no good now, you lousy tart."