Chaucer's Canterbury Tales is in essence a satire. In this medieval work, many types of professions are satirized. For instance, the religious leaders, such as the monk, the nun, and the friar, are exposed as being corrupt and self-indulgent. They are a far cry from the Christian ideals that they are supposed to represent. By portraying such individuals in this way, Chaucer leads his readers to see the corruption and hypocrisy within the supposedly sacred church. As for your question concerning the knight: Chaucer does much the same thing. With the exception of the Prologue and perhaps the Knight's Tale, none of the knights portrayed in the stories are examples of nobility or chilvary. They are portrayed as vain and foolish (the Merchant's Tale), overzealous (the Physician's Tale), or vicious (the Wife of Bath's Tale). Chaucer, in other words, does not portray his knights in a romantic, idealized way. Rather, he shows them as flawed and comical. As such, he most likely paints a more realistic portrait of the way knights were in these times than some of the other medieval works.
Of course, you must remember that the Wife of Bath is telling this tale. She is somewhat a feminist and would have no illusions about the weaknesses of men. She begins her story with a rape, but in a way, her knight does redeem himself. He eventually learns what women truly want, and he learns to practice what he learned after the old woman he was committed to marry lectures him. When he allows her to choose the kind of wife she will be to him--beautiful and disloyal or old and faithful, he decides to let her choose. When he does, he is rewarded with a wife who is beautiful AND faithful. When women are in control, the Wife of Bath seems to say, everyone is happy.