Sir Gawain and the Green Knight is a medieval romance. It is escapist in nature. It's not supposed to be realistic. It is anything but. The work is idealistic, filled with the imaginary, created, chivalric code common in medieval literature.
Works like this one don't include characters that are like actual human beings. No society ever lived under the chivalric code. It is imaginary. It is the stuff of legend.
The line you ask about is tremendously idealistic. It presupposes that no harm can come to a truthful person. It is the product of an age that still believes in an ordered universe (at least in its literature), in which right always triumphs over wrong and good always defeats evil.
In short, the line is idealistic, wishful thinking. It couldn't be more wrong. History demonstrates that men, whether or not they are true to their words, have plenty to fear.
Gawain is, however, considered a step toward more realistic, less idealistic literature, though the line you ask about doesn't suggest that. Gawain is a very early example of a hero that actually has faults. That's rare in medieval romances. As such, it is a forerunner of literary things to come.