I think the idea of state monopolies over "vices" (see also, government-run liquor stores) is to remove the profit incentive from running these businesses while still providing legal options for customers so they don't enrich criminals.
EDIT: to address the sibling comment. if companies that manage the monopolies earn a fixed fee rather than per-unit, the non-profit motive is still attained.
Depends on how you look at it. Where I live the mobsters returned a much larger share of the betting as prizes, back when it was called the "numbers racket". The state doesn't actually get that much, but the company they hired to administer the lottery does.
EDIT: to address the sibling comment. if companies that manage the monopolies earn a fixed fee rather than per-unit, the non-profit motive is still attained.