Smaug isn't a simple minded insect operating on pure instinct, though.
He's canonically a highly intelligent and shrewd being and should thus be able to distinguish between good and evil and understand the consequences of his action.
Tl;dr: he is capable of understanding the difference and CHOOSES evil behavior, making him evil.