Sometimes npc's will do that and sometimes they ask if they can keep what you dropped, usually they just ignore it though.
This happens to me all the time. I was once sneaking through a Forsworn camp and I accidentally picked up a bucket. I dropped it after picking it up and a Forsworn Briarheart came up to me and said "I believe you dropped this". After that dialogue he proceeds to attack me and alert everyone of my presence. It is quite anoying. If you want to throw something out, put it in a barrel or something.
Yes, it´s annoying but even more so if --> I dropped the statue of Gray Fox (I wanted to put it above the fireplace at my Lakeview home. As we all know, it´s not the eaiest item to place and as such, it took me several attempts (understatement) before I finally succeeded. I stood back to admire my achievement for a moment.. just to hear my Nightingale-bard saying: "Oh, I think you dropped this, here you are, no need to thank me!" >_>
"..the best bard is a dead one" (Nazir, the Dark Brotherhood)