@StuWilson and @Micah gave you the in-universe explanation, but I wanted to add an external, narrative reason. One of Tolkien's main themes in LotR and the Third Age was the estrangement of peoples from each other.
With the Last Alliance, the united front of Men and Elves in the end of the Second Age, marking the beginning of the Third Age, the age of suspicion. Elves retreated into their forests and strongholds, Dwarves into their mountains, and Men became suspicious of all the strange folk.
Thus, the friendship of the Dwarves of Moria and the Elves of Eregion, and especially the cooperation between the smiths and crafters of both kingdoms, was a major feature of the pre-Third Age (relative) bliss and harmony between the races.
Incidentally, one of the most vilified elements introduced by Peter Jackson in the LotR movies, the coming of the Elves to the aid of Helm's Deep, is actually a lovely homage, in my opinion, to Tolkien's underlying themes. The plot of LotR and the closing of the Third Age depict a reversal of the policies of isolationism and estrangement. Aragorn, taught by and living with the Elves for decades, becomes King of Gondor and takes an (humanized) Elf for a wife, thus bringing the two races closer together - or at least what remains of the Elves in Middle Earth. Gimli and Legolas also become fast friends, with Legolas appreciating the beauty of the Glittering Caves of Aglarond, and Gimli willing to concede the beauty of Fangorn. This is also symbolic of the bringing together that Tolkien tried to express. This is why I do not object to Jackson's creative liberty with the forces of Lorien coming to the aid of the Rohirrim: it's there to express exactly that sentiment.