It's really important to look at humans in the Bible, not through the lens of "Black hat" and "White hat" but as people. The "protagonists" in the stories are hardly virtuous in perpetuity, and the "antagonists" are not without redeemable realities.
God, however, holds up as a consistent protagonist and the people He serves and saves are absolutely fascinating.