The great men and women in the Scriptures 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 Biblical Images nby Rabbi Adin Steinsaltz