Kind David had issues. So did Solomon.
One lesson I take from that is that in many cases, the average saved sinner on the street is a better person than either of them. Paul killed Christians by the bushel, but became and apostle.
We’re broken people. That simple. Those that stay faithful in marriage and work hard to bring up their kids are bigger people than those we enshrine in most cases.
With large opportunity comes large risk. The bible is such a realistic document because it never sugar coats its most famous and influential figures; they come on to the pages warts and all, confessing their sins if not openly committing sins. The only exception being Jesus who never committed any sins, and thus never had any sins recorded nor had to confess any, but he bore the sins of many to the cross.