I always assumed Kamek went mad.
His pre-boss remarks seemed to become more and more iritated and desperate throughout Yoshi's Island (that is something like his speech before Raphael the Raven seemed more deranged than that before Bert the Bashful.)
By the end, he had put all the power he had into his lord, Bowser, in a final attempt to stop Mario and Yoshi in theri tracks. When this was ended in embarassing defeat, he simply snapped, and flew off to live happily on the moon.
Dunno. That's always just the impression that I get.
Aid