The dwarves are so worried that the elves will steal their treasure that they lie to the elves about their journey through Mirkwood. This develops the theme that blind greed will hurt you.
Because the dwarves are greedy so they lie because they want the treasure