The Talmud debates why the dice-player is disqualified as a witness. Rami bar Hama holds it is because he engages in an אסמכתא (a conditional transaction lacking binding intent), while Rav Sheshet holds the reason is that he does not contribute to the betterment of society (אינו עוסק ביישוב העולם). This sugya is the central Talmudic locus for the laws of gambling.
מַתְנִי׳ וְאֵלּוּ הֵן הַפְּסוּלִין: הַמְשַׂחֵק בְּקוּבְיָא, וְהַמַּלְוֶה בְּרִיבִּית, וּמַפְרִיחֵי יוֹנִים, וְסוֹחֲרֵי שְׁבִיעִית. גְּמָ׳ מְשַׂחֵק בְּקוּבְיָא, מַאי קָא עָבֵיד? אָמַר רָמֵי בַּר חָמָא: מִשּׁוּם דְּהָוֵה אַסְמַכְתָּא, וְאַסְמַכְתָּא לָא קָנְיָא. רַב שֵׁשֶׁת אָמַר: כֹּל כִּי הַאי גַוְונָא לָאו אַסְמַכְתָּא הִיא, אֶלָּא לְפִי שֶׁאֵין עֲסוּקִין בְּיִישּׁוּבוֹ שֶׁל עוֹלָם.
MISHNA: And these on the following list are the ones who are disqualified by the Sages from bearing witness due to their unseemly behavior, as they are considered wicked individuals guilty of monetary transgressions: One who plays with dice [bekubbiyya] for money, and one who lends money with interest, and those who fly pigeons, and merchants who trade in the produce of the Sabbatical Year, which may be eaten but may not be sold as an object of commerce. GEMARA: With regard to one who plays with dice for money, what is he doing that disqualifies him from bearing witness? Rami bar Ḥama says: He is disqualified because gambling is a transaction with inconclusive consent [asmakhta], as one who gambles does not have conclusive consent to pay when he loses since he plays under the assumption that he will win. And as an asmakhta does not effect acquisition, the one who wins takes money that is not legally his, and is considered a robber. Rav Sheshet says: Any case like this is not an asmakhta. In a game of dice both sides realize that they might lose, and consent at the outset to pay if that happens. Rather, those who play dice are disqualified because they are not involved in settling the world, i.e., in productive occupations that demand hard work. Since they do not realize the effort required of most people to earn a living they might not be scrupulous about other people’s money, and their testimony cannot be relied upon.