A trick is a hoax or sneaky scheme. If you fool people into thinking they're donating to a good cause when you're really keeping their money, you're playing a trick on them. It's not nice to trick people.
"A mean ruse" is the oldest meaning of trick, which is rooted in the Latin tricari, "be evasive." Today it's also used for less mean-spirited deceptions, including funny practical jokes and a magician's sleight-of-hand illusions, commonly called magic tricks. To trick someone is to fool them, and if you hold a trick in your hand, you're playing bridge, hearts, or another "trick-taking" card game.