And it is randomness that gives gamblers hopes to win. Casinos stay profitable not because of randomness but rather in spite of it. When you bet long enough, randomness gets removed from the equation entirely. And what remains, as you might have already guessed, is called house edge. Randomness can override the house edge but not for long, so technically it is against the casino. The latter just uses it to lure gamblers into believing that they can win, and they can in fact if they are lucky to conquer the odds and wise to keep their wins
Randomness is what protects a casino against a smart player. Something that is not random, i.e. predictable with even the slightest chance of sustainable success, will be eventually exploited (think blackjack card counters).
There is no way to override the house edge. It's built into the game mechanics (number of roulette pockets, the 49.5% win chance on a 50:50 dice roll, etc).