I am not a thief. I find that behaviour reprehensible.
You may counter that the dragon is a thief, and therefore deserves to have the gold taken from him.
Do I look like fucking Robin Hood? Do you see a pointy hat?
No! I wear un-pointy hats, and only when I deem it appropriate! Sometimes, I don't wear hats at all!
Plus, have you seen a dragon? A dragon would straight up kill me. It'd be easy for the dragon. He'd have to raise his hand like a little, then let it fall on me. He wouldn't have to apply any downward force beyond what gravity would create. I might not be squished into a patty, but some of my torso would rupture from the force, and at least one organ would see the light of day.
Or the dark of his cave, am I right?
Seriously, though, I would not try to steal anything from anyone, especially not someone that I'd need a magical sword to defeat. Do I look like I have the money to buy a magical sword? Do I!!?!??!
Short Answer: Maybe he's just a wise old dragon who invested well. It's like his own 401cave. (Is that a bad joke? Am I capable of bad jokes? Am I!!?!??!!!!!)