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.