We have no understanding of these people; yet we can suggest that perhaps when Doeg and Achitofel finished learning, they demanded more and more learning. When Dovid finished learning ½ a night, it says: חֲצוֹת לַיְלָה אָקוּם לְהוֹדוֹת לָךְ עַל מִשְפְטֵי צִדְ קֶּךָ תהלים קיט סב that he spent the other ½ singing and thanking (Gemara) in appreciation for the first ½. (R' Zundel of Salant Zatzal).
When a person is always thanking and appreciating his Avodas Hashem, then he is a happy person and it’s easy for him to be Dan L'kaf Zechus. Dovid was loaded with Ha'tavah B'makom Hakpada, i.e., Davka doing a favor (Ha'tavah) instead of being upset (Hakpada), even from his worst enemies. And we don’t see this Hanhaga by Doeg and Achitofel. Yerushalayim was destroyed because they didn’t make a Bracha on Torah. (Gemara). We see how: חָ מוּר serious it is to appreciate the Torah that you learn. The more you appreciate the more you blossom. The more you belittle and criticize, the more you invite destruction, Chas V'shalom.
This is Dovid’s greatness; i.e., he learned and he appreciated his learning. His biggest Kapit'el (chapter) (by far) in Tehilim is: קיט (119) which his loaded with thankfulness for: רוֹב תוֹרָּ ה loads of Torah. Perhaps Dovid learned from Avraham Avinu to be extra thankful!