The swabs are used to check for explosives and/or drugs. Indeed, if you manipulated any such substances in the near past, it's likely that traces can still be found on your hands, and on the things your hands usually touch: bag handles, zippers, pockets, etc.