As no other knight accepts the Green Knight’s challenge, King Arthur has to do it to honor the code of chivalry. Gawain steps forward, thus relieving Arthur of this duty. He does it to protect the king’s life and honor the knights of the Round Table. Sir Gawain assumes the challenge to be deadly.
Detailed answer:
The Green Knight arrives at Camelot on New Year’s day and challenges the knights to play a beheading game with his ax. The knights are afraid, as his stature suggests that he has supernatural powers. He mocks them for their cowardice when no one accepts the challenge. King Arthur is enraged by the Green Knight’s behavior. He is ready to take him on when Gawain interferes. All the others persuade Arthur to let Gawain face the Green Knight instead, which he eventually does.
Sir Gawain is Arthur’s nephew and the youngest of his knights. He might be the weakest of them (according to his own words). Yet, it does not stop him from accepting the challenge. He states that King Arthur should not bother to take risks when there are so many brave and skillful knights around him. Gawain shows courage and loyalty to King Arthur when other knights hesitate to act. He knows that the game will probably cost him his life. But he values it less than the life of his king. Moreover, he sees it as a possibility to prove himself among other knights and protect the reputation of Camelot, as it becomes clear from his speech.