I've always liked the idea of elves, dwarves, and halflings all being the same race at different stages and in different genders. Elves being the flighty, fay, serendipitous male adults and dwarves being the gruff, steadfast, homebody female adults. The two groups almost never mix, and in fact can't stand each other most of the time, except in a short mating season that comes around roughly every 50 or so years and lasts for roughly 3 months, though different regional groups might have different cycles than others and the period might be shorter or longer. In between this time, however, the two groups are distinctly unfriendly towards each other and indeed prefer the company of their own kind, both romantically and otherwise.

Halflings, however, are the child and adolescent stage. From birth to the beginnings of puberty* they are drastically different from their adult stages and once able to fend for themselves are driven from the dwarven halls to learn about the world. Upon reaching puberty they begin their transformation into their adult stage, becoming either Tallfellow Halflings(male) or Deep/Stout Halflings(female) and proceed to slowly grow into their new forms over the course of 50-65 years. Once they've reached full maturity* they feel a yearning to return to the lands of their birth and from there to seek out the settlements of their respective type.

This helps to explain why both elves and dwarves appear to be dwindling, ancient races that almost never seem to have any new members come about and the child-like antics and theivery of the hobbitshalflings.

*I use these words because they're the best analogy, not what actually happens. Halflings grow at a similar rate to gnomes and reach the end of their adolescent stage around 60-ish, though they are physically, mentally, and emotionally equipped to do the deed well before then albeit highly unlikely to be fertile or even really wanting to until they enter the Middle stage. Upon the end of their middle stage they reach "maturity" though again, it is fully possible for them to have children before that point.