Oooo. I like hypotheticals.
A person has their home invaded by a band of drug warrior douche bags wearing badges....You gonna thank them?
If that person was being held prisoner by meth addicts, and was subsequently saved by the "invasion", they might be inclined to do so. Sure.
An empire building gang of military thugs drones your family and occupies your home and town....You gonna thank them?
If it was done to liberate and defend that person's country from terrorists that were going to rape and kill his family anyways. It's possible, sure.
A 17 year old shit werewolf takes a massive dump on your living room carpet...You gonna thank him?
Trick question. Everyone knows you don't let pet werewolves into the living room, silly.
A pot smoking air force uniform wearing supply clerk steals your oranges....You gonna thank him?
If he offered to share the joint he was smoking, I would definitely say thanks. I would also let him know that it's cool to come by and pick a few whenever he wanted.
Fun!!!