It does get easier, but I don't know that it ever gets easy.
I should amend that. For me, most of the time it is pretty easy. I've done a good job of making sure that temptation isn't too close--clearing out the pantry, buying tasty stuff that's more diet-friendly so I don't stray to the stuff that isn't, that kind of thing. But there are times that driving by Krispy Kreme or walking past a display of Cheez-Its in the grocery store sets off a major longing for the junky stuff.
The good news is that these episodes of "I WANT" are both shorter and less sharp as time goes on. They happen maybe a few times a week, not a few times a day and certainly not multiple times a day. I quit smoking, yet I experience cravings for cigarettes sometimes, too. The food cravings are the same thing--I can experience the short, sharp desire for X, but I know how quickly it'll pass now and I no longer sweat it.
There was a time that cravings were miserable to me and lasted for a few hours, so a few minutes of them a week is really no sweat at all.
You did great to put the candy in the back seat and to give them to a neighbor as soon as you could. Brava!