Here's why:
* The Woodland Realm: The elves of the Woodland Realm, where Bilbo encounters them, lived near the borders of the dwarf kingdom of Erebor. This proximity made trade a natural and logical interaction.
* Goods Exchange: The elves traded with the dwarves, offering wares like wine, food, and beautiful crafts in exchange for the dwarves' treasure, metalwork, and craftsmanship.
* The Lonely Mountain: This trade relationship is highlighted when Bilbo learns about the dwarves' journey to the Lonely Mountain to reclaim their treasure. This treasure, which is meant to be shared with the elves, fuels the entire quest of The Hobbit.
While the elves might have traded with other races too, the dwarves were their main trading partners in the story.