The word casino, which derives from the Italian for “a small villa,” has long been associated with pleasant activities, not the least of which is gambling. But it’s important to be clear-eyed about how casinos earn their bright lights, giveaways and bling. They make their money from gambling—at which almost everyone loses, thanks to the irrevocable laws of probability.

Casinos use technology to enhance security as well as to monitor games themselves. For example, betting chips with built-in microcircuitry interact with electronic systems at the tables to enable casinos to oversee exactly what’s being wagered minute by minute and be warned quickly of any anomaly; and roulette wheels are electronically monitored regularly for statistical deviation from their expected results. Casinos also use computers to supervise slot machines and other table games, using a high-tech “eye in the sky” to track every movement of every player and game piece.

In addition to keeping an eye on players and other casino employees, casinos use cameras throughout the premises to protect themselves against cheating and theft. Because large amounts of currency are handled within a casino, both patrons and staff may be tempted to cheat or steal, either in collusion with other people or on their own. That’s why casinos spend so much time and money on security.

In addition to gambling, casinos earn some money from food, drinks and entertainment. But they make most of their money from the games themselves. That’s why they reward regulars and big spenders with comps, free hotel rooms, meals and tickets to shows. They also offer loyalty programs that can reward players with electronics, bonuses and even trips to Las Vegas or other destinations.