Why do elves prefer bows; and dwarfs, axes? Why are elves, lean; and dwarfs, stocky?
Possibly it's how they evolved to adapt to their natural habitats, perhaps in a way not very different from that of our species. I'd say: elves are more adapted to living in the valleys and forests --- the ears to hear better over large distances and lean bodies to move from tree to tree with agility, and bows and spears to protect themselves from a distance. The stocky dwarfs are obviously better suited for the mountains -- where their large axes are fit to call death upon a single blow; perhaps to compensate for their lack of agility. Their art also reflects how- and where they live.
Of course, this is just taking things seriously. None of us can prove at the moment if such creatures really existed in the natural world.
Being a fan and student of both mythology and anthropology, I've postulated this theory, partly for fun, and partly as an attempt to "rationalise" their existence in a naturalistic way:
Elves: About 150,000-100,000 BCE, stable populations of a tall and lean breed of late archaic Homo sapiens---or perhaps, an advanced breed of Homo habilis---slowly emerged as a separate species in the temperate valleys of Eurasia. Anatomically similar though far more complex than the breed of Homo Sapiens sapiens later to appear in East Africa, they were far slower in ageing, more agile in reflexes, keener in hearing, and sharper in eyesight. They were taller and leaner in appearance (ave. of 6 feet in height), had light-weighed bones, a long skull, high nose bridge, smooth skin texture, and fair--almost pale--colouring. Thus, a physiology developed in the temperate regions in Eurasia – well equipped for a region of deep valleys and large forests, barred by high mountains. Evidence of earliest urban civilisations must have appeared far later, as the ice sheets retreated and the regular celestial manifestations of the sun reappeared. They bore a culture which centered on extensive hunting/gathering and animal herding. They preferred abodes around large old trees and/or within valleys (often camouflaging their architecture with its surroundings) where they developed textile-weaving, metallurgy, and smithcraft celebrating their habitat. An area between the west Caucasus mountains and east of the Black Sea (then Lake Euxine) would have been the earliest possible site of urban "Elven" culture (cf. Cuvienen).
Dwarfs: About 250,000-100,000 BCE, stable populations of a short and stocky breed of early archaic Homo sapiens (possibly related to Homo Sapiens neanderthalis) emerged as a separate species in the European part of the Arctic circle; in the highly mountainous regions of northernmost Europe and possibly nearby lands in northern Asia. Short and stocky in built with an average of 4 feet in height with heavy bones, they were hardier and tougher than most current hominid breeds of the time, thus were well equipped in living in mountainous areas, and in the deep, dark places under them. The earliest evidences of their urban civilizations are believed to have appeared much later in their history; where they built cities made mainly of stone and metal; and centred on metallurgy, smith-craft, and mining. The prehistoric mountain ranges of [now] Norway, the Swiss Alps and the northern Urals could be a plausible candidate for the earliest cultural Urheimat (homeland) of their pioneering urban civilisations (cf. Durin).
There exists a more "rational" way of explaining their [possible] historical existence, though. Quote, Wikipedia on Dwarf: Stories of dwarves may have a historical background: during the Bronze Age, tin miners from southern and south-eastern Europe slowly migrated northwest, since the relatively rare tin, which is needed to make bronze, was more common in the north. Being southerners, they generally were of shorter stature than northern Europeans and had darker skin, hair and beards. Their knowledge of metallurgy might have seemed magical to the northerners, whose lifestyle was still neolithic; the southerners' superior weapons and armour might well have been perceived as enchanted. This would explain why stories of dwarves are especially common in Northern Europe, and also why dwarves are portrayed as workers, while few other mythological creatures seem to be associated with any kind of organized industry.
More generally, the pygmies of Africa, the short Eskimos, Sami (Lapps), the Asian Dropa pygmies of Tibet, short rainforest natives, people with dwarfism, and similarly short people may have had a hand in the origin of dwarf legends in many countries.
The field of Depth Psychology has suggested that dwarfs are most frequently psychological symbols of what Carl G. Jung termed the "Shadow." The Shadow is the portion of the human psyche which contains personalities, behaviors, and/or events that have been suppressed by consciousness in the unconscious in a personal, societal, or collective manner.
Another origin might go back to hunter-gatherer times, when only those with physical defects would be available to do anything other than hunting and gathering. Those with dwarfism might be stuck as permanent craftsmen, and an association between crafting, and dwarfism might have developed.
Pfew. I took that rather seriously, didn't I?
Images from The Battle for Middle Earth II.