David wrote Psalm 51 after committing adultery with Bathsheba and having her husband Uriah killed. Though he sincerely repented of his sins, some leaders are removed from office for moral failures because they do not truly repent or only repent for show. While some sins may disqualify leaders, more often leaders fail due to deceptions rather than mistakes. People are usually willing to forgive leaders who take ownership of their mistakes, but not those who remain unrepentant and deceive the public.