Dwarves aren't defined as Small size in AD&D 1st or 2nd edition – they just happen to be. The thing is that creature sizes work differently in AD&D than in D&D 3.x.
Size By Simulation
In AD&D, your size class isn't attached to your race, it's attached to your actual height and weight. In AD&D, a medium creature is defined as between 5+' and 7', and of average build. In 2e, a medium creature is defined as 4+' and 7', and of average build. The listing in the 1st and 2nd edition Monster Manual is merely the size class of a typical member of the dwarven race, not a blanket size category. In AD&D, both editions, actual size determines mechanical size class.
This can be seen especially in the (optional, at most tables) random height tables in 2e. It is possible to roll a dwarf between 3'6" and 4'5", making the first dwarf Small and the second Medium. In 1e your height and weight were up to you to pick, and you could easily have a Small human along with a bunch of Small dwarves, if everyone picked their heights to be 5' or less.
Size By System
In 3.x, the general push to normalise the rule subsystems resulted in some changes that put the game system ahead of the fictional simulation. One of these was the size categories. In 3.x, adult dwarves simply are medium creatures, and that's the last word. This inverts the relationship between mechanical and fictional size compared to AD&D: in 3.x, your size category is what is important, and your actual height is mostly irrelevant fluff.
Why Medium though? A lot of the choices in 3.0e were made simply to make it compatible with the expectations people had developed from 2e. It's only speculation, but it's entirely likely that dwarves were made Medium creatures simply because a typical dwarf PC in 2e was medium too. Many groups were converting existing campaigns to 3e, and dwarves have always been popular. There would have been an unholy uproar if suddenly there were players everywhere whose favourite dwarven PCs suddenly turned into less effective fighters than they were in 2e.
I've seen three (4, now that I've seen harlandski's Gygax quote) reasons for Elves being immune to a Ghoul's paralysis ability:
Positive Energy
Per the Gygax quote, elves are suffused with positive energy, rendering them immune to the negative energy which powers a Ghoul's paralysis.
Tolkien Immortality (and historical inertia)
Apparently, an old source book (PC1: Tall Tales of the Wee Folk Pg 24) states that Ghouls' paralysis is caused by the victim's fear of death; Elves (who are immortal, in the Tolkien Immortality "can't die of old age" sense) thus have a sufficiently different vision of death that they're immune. (source)
Historical Inertia
Chainmail, on which D&D was (in large part) based, made Elves immune to Ghoul paralysis as a balance mechanic: Ghouls were cheap, Elves were expensive, and the immunity prevented Ghouls from zerg-rushing Elves. (source)
Pathfinder Lore
In Golarion (the default Pathfinder setting), the first Ghoul was an Elf, and the elven immunity to their paralysis is a manifestation of that.
The fact that elves have an unusual immunity to this paralysis is curious indeed, but most point to Kabriri’s form (and to the almost elven features of most ghouls) as the answer. They say that before he succumbed to his cannibal urge and became a demon, Kabriri himself was an elf. The long ears and slender bodies that most ghouls develop, despite their original race, is thus an echo of Kabriri’s legacy—and the fact that their paralytic hungers have no effect on elves is but another manifestation of this strange bit of history.
(source)
Significant Limitation/Caveat: all of these sources are second- or third-hand, and some are definitely retroactive and/or campaign-world-specific explanations.
Best Answer
Short answer
It's a tradition, since the introduction of that creature in Dragon Magazine issue #64, 1e edition AD&D, and subsequently Monster Manual II. (A lot of stuff rolls over from edition to edition.)
Feature Creep. As supplements came out for the original edition of AD&D, the new stuff tended to be "cooler / better" than the old stuff" -- this is also true in more recent editions' splat books and supplements. Demons and devils were "old stuff" from the 1977 monster manual, and the Solars (most powerful of spirits and opposites to demons and devils) arrived in 1982 (Dragon #64) and 1983 (Monster Manual II).
As with the various mythologies, deities, and pantheons folded into the game, adapting a Judeo-Christian inspired angel-type took something already known and fit it to the game. (Note that the Christian god is NOT in the game). These powerful good beings serve any of the in-game Good deities already in place.
The parallels to the Choirs of Angels from Christian belief and tradition (mythology if seen from outside the religion) is a re-skinning to arrive at "similar but different."
Longer Answer
Cutting and Pasting Angels (Christian) as could be done for some devils and demons could not done for two reasons.
(Slight digression) An example of the kinds of cultural taboos that Gygax and friends dealt with in contemporary culture surrounding them: in films in the '50s and '60s, you almost never saw anyone portray the character of Jesus Christ and have the actor show his face on screen. (Ben Hur is one example.) This taboo was eventually broken, but shows such as Jesus Christ Super Star and The Last Temptation of Christ earned criticism from Christian groups in a variety of denominations, including the "face of Jesus" complaint. (Lost in a long list of complaints.) I remember reading about this firestorm as a teen, when it was a contemporary flailing - culture clash. Gygax was aware of the cultural sea they were swimming in, and, he also didn't want to mix his religion and his business. (1) D&D received its share of vitriol from Christian sources.
D&D was influenced by a variety of literature, stories, myths and legends, and added from many sources as it grew and developed. Influences on the authors included basic Western Christianity, civilization, and cultural touch points. D&D was originally built on a Dark Ages / Medieval European chassis:
Christendom, as a cultural model, was the state of being of Europe around the time of the Crusades. (Note, the Castle and Crusade Society was the wargaming club that fought medieval miniatures table top battles.(See intro to Men and Magic p. 3)).
Core cultural references from Christendom embedded in D&D from it origin include:
Adding a supernatural archetype (angels and archangels), albeit re-skinned from standard Christian symbols and mythology, is (a) NO surprise and (b) fits the game's theme. It also served as a balancing to the demons and devils already present, and to flesh out the higher planes of existence. (See Appendix IV to the original PHB, on p. 121). The occupants of evil planes were well accounted for, the good aligned planes ... not so much, even though it was proposed in Dragon #17 in 1978.1
Finally, Gary Gygax was a life-long Christian. Him fitting angels into a game full of the supernatural is consistent with the core themes woven into the game from before its first draft. Re-skinning them to deal with taboos is related to his internal conflict between his game and any overt Christian influence on it.
Gary Gygax spoke about this later in life. At GenCon Indy 2007, Gary sat on a panel discussion, hosted by the Christian Gamers’ Guild and treating the topic “Christianity and Gaming”:
1 (Dragon #17, p. 32-33; August, 1978; Stephen Dorneman):
This answer to the original question came before Mordenkainen's Tome of Foes was published. @illustro's answer covers that ground.