Although the distinction between good and evil, between sinners and saints is clearcut and unequivocal in the Scriptures, there is no attempt to adjust events and incidents to suit the general image of a personality.
The great men and women who serve as examples and models for all generations are not described only in terms of glowing admiration.
Their failings, failures, and difficulties are described with the same objectivity as are those of the sinful.
And the contrary is also true: the good points of those generally considered to be negative personalities are also shown.
The "good guys" of the Scriptures are not plaster saints, all "sweetness and light."
Nor are the "bad guys" monsters, but human beings shown in all their many (and sometimes contradictory) aspects.
–Rabbi Adin Steinsaltz
From the Introduction to Biblical Images by Rabbi Adin Steinsaltz