OP, ignore the miserable sods on here. I think it was a lovely thing that you did and I know of lots of confident 2-3-4 year olds that DD went to school with who would have happily stood at the door with baskets of treats to give to their friends (unfortunately DD wouldn't because she's quite shy).
As an aside, those posters who say their nurseries have 'banned the practice' normally because one miserable parent has said that they don't want their 'precious' DC given unhealthy treats, the Nursery owners need to grow a backbone.
At DD's pre-school the owner would have said 'if you don't like it you know what you can do' which is exactly what he said to someone who complained that the Vicar came in before the Easter holidays to tell the story of Jesus resurrection. An establishment cannot be ruled by one parent and if it's a good, well-established school, there will always be someone else willing to take up a place if one becomes available
.
Having said that if it was EVERY DAY that is a different matter, but I doubt it is...
I think I would leave it though OP and as someone else has suggested, maybe with your DS's new pre-school, ask what is the 'norm' before you offer such a nice gesture again.
Right, off to work out what Halloween cupcakes to do to send into DD's new reception class the day before the half-term break... 