Gambling companies generate revenue through player losses and bets placed on their platforms. They set odds or house edges that favor the house in casino games and sports betting, ensuring a consistent profit over time.