The core prohibition is set out in the Mishnah and Gemara: one who plays dice (קוביא) for money is disqualified from testimony, with Rami bar Chama explaining that such winnings are an asmachta — an inconclusive undertaking that does not effect a valid transfer — while Rav Sheshet holds the problem is rather that the gambler is not engaged in the settling of the world (Mishnah Sanhedrin 3:3, Sanhedrin 24b-25a), a dispute the Tosefta also reflects in describing how such a player can only fully retract by breaking his gaming pieces (Tosefta Sanhedrin 5:2).
The Rambam, in his commentary on the Mishnah, grounds the prohibition in the principle that a person should occupy his life only with Torah or with a trade that sustains the world, so idle dice-play for stakes falls outside legitimate human activity (Rambam on Mishnah Sanhedrin 3:3), and the Meiri similarly explains that such players are disqualified because they are suspected of dishonesty in monetary matters and do not understand proper dealings or the gravity of oaths (Meiri on Sanhedrin 24b).
The Shulchan Arukh codifies this as a rabbinic form of theft: one who plays with sticks, stones, bones, or with animals and birds on a stipulation that the winner takes a set amount from the loser is called a thief by rabbinic decree, though the Rema notes that the prevailing practice disqualifies only one who has no other trade, since having a livelihood elsewhere removes the stigma even when playing with a fellow Jew (Shulchan Arukh, Choshen Mishpat 370:2-3, Shulchan Arukh, Choshen Mishpat 370:1), a ruling the Arukh HaShulchan preserves in near-identical terms while adding that true dice-play, where the stake transfers immediately, avoids the asmachta problem but still carries the separate prohibition of idleness (Arukh HaShulchan, Choshen Mishpat 370:5-6), and the Sma elaborates that the rabbinic theft stems from the fact that the loser does not forgive his money wholeheartedly even though it is not theft by Torah law (Me'irat Einayim on Shulchan Arukh, Choshen Mishpat 370:3-5).
The topic is amplified beyond dishonesty into actual theft-concern: the Shulchan Arukh's discussion of pigeon-flyers and gamblers together as 'thieves by rabbinic law' situates card and dice play within a broader category of unfair acquisition of others' property (Shulchan Arukh, Choshen Mishpat 370:1), and Rav Ovadia Yosef's page describes this same category of stake-based games with sticks, stones, bones, or animals (Maayan Omer 10:6:60).
On Shabbat and Yom Tov the concern sharpens: the Shulchan Arukh forbids playing with nuts or apples on the ground lest one come to level out holes, permits it on a table, but forbids play undertaken to profit even without the ground concern, since that resembles buying and selling (Shulchan Arukh, Orach Chayim 338:5), a distinction the Mishnah Berurah elaborates by explaining why a table is treated differently from the ground (Mishnah Berurah 338:18-20), and the Rambam similarly forbids women's nut and almond games on Shabbat for fear of leveling holes (Mishneh Torah, Sabbath 21:3). The Mishnah Berurah extends this to lottery-style allocation games, classifying them as dice-play and a form of rabbinic theft forbidden even on weekdays because of the concern that one may come to gamble with others (Mishnah Berurah 322:22).
Tzitz Eliezer rules directly on card-playing, forbidding it on Shabbat and festivals even when the stake is merely a bottle of wine or cognac, and all the more so when money is at stake, and he adds that card-playing should be avoided even on weekdays, drawing on the same Gemara in Sanhedrin and on Maimonides' Laws of Testimony (Tzitz Eliezer 19:21).
Nishmat Shabbat gathers later authorities on the practical scope of the prohibition: one strand, following the Rema and the responsum of Maharit Tzahalom, forbids gambling to win money because it resembles commerce, while Rabbi Moshe Fruchenzalo is cited as permitting play for small sums such as four or five dinars (Nishmat Shabbat vol 6:407); a further passage cites the view that one should avoid games generally played for profit even when played for free, since majority practice fixes the game's status as forbidden, though it also raises the question whether only the winnings, rather than the playing itself, ought to fall under the decree (Nishmat Shabbat vol 6:411).
The Shenei Luchot HaBerit situates dice and card games within the category of leitzanut (frivolity), citing the Reishit Chochmah's view that such play lacks words of Torah between the participants and resembles the mockery condemned regarding games in Avodah Zarah, adding that playing such games specifically on festivals compounds the wrong beyond the theft prohibition itself (Shenei Luchot HaBerit, Shaar HaOtiyot, Shetikah:24).
B'Mareh HaBazak addresses a modern communal case — a synagogue bingo operation run by a non-Jew on Shabbat and Yom Tov — ruling that a Jew may not benefit from financial profits generated through desecration of Shabbat or Yom Tov performed by a non-Jew on one's property (B'Mareh HaBazak Volume VII 26:2-4).
Background sources on the sheet reinforce the underlying monetary ethic without addressing gambling directly: the Keren Orah's discussion of the disqualification of a lender on interest parallels the structural disqualification for gambling found in the same Mishnah (Keren Orah, Sanhedrin 25a), the Kitzur Shulchan Arukh states the general prohibition against robbing or stealing even a trivial amount from anyone (Kitzur Shulchan Arukh 182:1-3), and Mishlei teaches that wealth gained through vanity diminishes while wealth gathered through labor increases (Mishlei 13:11).