Maybe it is like bower birds or nerds.
They are thinking that if they make their collection big enough then any day (century / millennia ) now hot chicks will be all over them when they see their collection of gold ( Star Wars collectables ).
Note that this kind of thing does tend to work better for bower birds than nerds.
A dragon's mileage may vary.
A collection is meant to get the attention of mates and show that he is strong enough to collect it. That's the way it works for many birds. Some grow tail feathers that are counter productively long in a display that says that he is strong enough to fly even with those 2 foot long feathers. Bird songs also show that the bird has the energy to chirp all day long and is in a good enough position that they don't have to fear predators.
However, it is possible that the reason why Smaug is so grumpy is that lady dragons would prefer collections of something useful like food sources or defenses for hatchlings. Smaug may be so invested in this method of attracting a mate that, since it doesn't seem to be working, he just tries harder at it.
Note: It may seem like I'm making fun of nerds on a SF&F board. I totally am. Imagine collecting Star Wars stuff. That never works. However, my collection of Babylon 5 stuff totally worked.