What looks bad can really be a Ma’ala. During WWII, the Lithuanian gentiles went all-out with the Nazis to destroy the Jewish population. It is known that many Jewish girls put sand on their faces not to attract the gentiles, or else they'd be in trouble. People love being popular, and admire it in other people who are popular. It's not SO Pashut (simple). When Dovid became a hero and he killed tens of thousands of Pelishtim, the women praised him, and they sang how Shaul only kills thousands, and Dovid kills myriads (tens of thousands).
This was the end of Dovid's relationship with Shaul. From then on, Dovid went through Gehinom from all the persecutions he had from Shaul. Even when Dovid escaped, and had to leave Eretz Yisroel and go to enemy territory (Pelishtim), the Kavod he got from those women haunted him. Achish Melech Gass liked Dovid, and he would have saved him and let him stay there, except that his men remembered what the women had once said about Dovid. According to the Malbim, they feared that Dovid would turn against them, in order that these women will praise him again.
It is striking that his having killed their giant Golyas wasn't what turned them against Dovid. It appears that Hashem, הַמְסַבֵּב כָּל הַסִיבּוֹת (who “causes” all the “causes”) caused Dovid to see how Kavod can hurt and hurt: בְּלִי שִׁיעוּר beyond measure. No wonder the Me'am Lo'ez says that nobody was M'vazeh himself for Mitzvos like Dovid. How happy a person should be with Bizayon!