Every noble action is selfish. Some selfish actions are nobler than others. But they are all selfish. And as such there can be no action purely noble anyway. Even the nobility in God's great philosophical intentions is bounded by his vanity.
If God were to exist for the entire humanity, he would be profoundly vile, as he allows the existence of unfathomable sin, stupidity, madness, and misery for no reason than his own despicable enjoyment. God exists though, not for all humanity, but for a one chosen man - a philosopher - who is bound to answer the greatest philosophical question, the question about the nature of the questioner's existence, which progressively quenches the divine vanity.