Calque of English trick or treat. Literally, “(little) sweet or (little) joke/prank.”
dolcetto o scherzetto