In Sir Gawain and the Green Knight, and in medieval romance more generally, a knight’s travel beyond his home court represents his venturing into an in-between state, outside of civilization’s comforting structure. This gives him a chance to explore his identity as a knight. Sir Gawain definitely undergoes this exploration. We see this when he negotiates the conflict between his knightly duties and the code of courtoisie during the seduction scenes. It’s also shown when he wars with his survival instinct in order to keep his promise to the Green Knight.
What’s interesting about the setting of the seduction scenes, however, is that they occur within the oh-so-civilized castle of Sir Bertilak. Of course, as we later learn, Sir Bertilak’s castle is actually controlled by the sorceress Morgan le Fay, whose magic powers align the castle setting with the enchanted wilderness full of magical beasts through which Gawain travels, a marginal space in comparison to Arthur’s court. Sir Bertilak’s castle is also a place where women’s powers are given free rein. Morgan’s is the invisible hand that controls the palace. Also, Lady Bertilak rules the bedroom as she presses Gawain under her thumb (even, at one point, "trapping" him beneath the bedclothes). Bertilak’s palace, then, might represent a sort of parallel universe to Arthur’s, one in which women hold power.
The final section of Sir Gawain takes place largely in the wilderness ruled over by the Green Knight. So wild is this place, that even the "chapel" is just a mound of dirt with patches of grass on it. Medieval readers might even have recognized this as a fairy mound, or portal to the supernatural world. This setting emphasizes the Green Knight’s connection to the "wild side" of life. There, Gawain undergoes his ultimate test and must come to terms with failure. His exploration of his identity complete, he can return to King Arthur’s court to be reincorporated into the society that the setting represents.