I blame Basic for this. As far as I remember the line had Lawful as code for Good and Chaotic as code for Evil. That distinction took me by surprise the first time (I mean why would a chaotic cleric be unable to cast healing spells?)
The fact that the Law and Chaos axis predates the Good and Evil axis is part of it, but if you think about it, that only moves back the question one step.
Why did Gygax tend to treat Law as Good and Chaotic as evil, or as stand-ins for those things in the first place? For example, the B2 "Caves of Chaos" might as well be "Caves of Evil" for the temple of Chaos is adorned in various demonic trappings, and chaos is used more or less interchangeably with evil. This also predates Basic.
In the source material, say Morcock, this doesn't occur. Both Law and Chaos are inimical to life, and extremes of Law or Chaos make life impossible. Life can only flourish - what Gygax identifies as 'Weal' - if Law and Chaos are in balance, and it is the forces of Neutrality, the representatives of life that must make their way between these life destroying extremes, that are identified with what Gygax identifies as the essential motive of Good.
So while you are in part right, this still begs the question why is Law seen as Good and Chaos as Evil by Gygax when that isn't really what is in the source material.
And I think that the answer is that Gygax is even more than most from his upbringing likely to equate Law with Good, and so engage in the same bias we see in the definition of "selflessness" and have the same "common sense" about selflessness that Hussar is up the thread evidencing when he suggests that selflessness is obviously good and he is stunned anyone would argue otherwise.
It's telling that "Selflessness" means both the abnegation of self or "motivated by no concern for oneself" and also at the same time "concern more with the needs and wishes of others than with one's own." Nothing about the abnegation of self or lack of concern for oneself necessarily implies compassion toward others or any sort of charity or any sort of proper valuation of or concern for others, and yet there it is built right into the language. There is a certain level I get it at, since it runs contrary to human nature to not be selfish, the most common and obvious sorts of vices are sins of selfishness, but I consider selflessness a very bad antonym for selfish or a bad synonym for humble. I also consider it likely that sins of selfishness stand out to us more, precisely because we feel wounded by them - that is even what we choose to view as evil is motivated in the main by selfishness.
So, I think it is just natural to assume if you come from a certain cultural mind set that anything to do with the self is bad, and that all virtue consists entirely of self-denial of some sort and that naturally if self-denial to reduce ones inflated self-importance is good, then even more self-denial must be better. And for that matter, we could certainly point out some Eastern philosophies that greatly praise selflessness in the literal sense of self-abnegation, but tellingly not all of them assume that self-abnegation naturally leads to attachment to and compassion for others. Indeed, some of them would find that outcome inimical to the intention.
Gygax I think properly associates Good and Evil with Weal and Woe, and although that definition is somewhat circular and leaves us needing to define Weal and Woe, it avoids the contradiction of having both the evil and chaos having to do with individuality and distinctiveness and law and good both having to do with commonality and conventionality.
Yet at the same time he never quite seems to give up the idea that LG is most good and CE is most evil.
But it's also telling that when he first creates a concrete conception of the divine for his fantasy world, both of the deities he creates are humorous but still quite pointed parodies of Lawful Good thinking. I don't think that's remotely an accident.