There is a constant and ancient tension in the UK between ‘racing’ and ‘betting’ since the bookmakers (big organisations such as Ladbrookes, Paddy Power, William Hill etc etc) claim racing is funded by them and racing (everyone else involved in the industry) claims that bookmakers just suck money out of the sport. Most races are sponsored by bookies these days.
I believe that the earliest Parliamentary Act to control public gambling dates to the 1740s. The Government today takes a big chunk of betting tax - but the offshore bookies don’t pay that even if they are based on UK racing. The Bookmakers do pay a levy back into racing, regularly re-negotiated, but this is invariably less than 10% of their multi-million take. The levy is used to support prize money, etc. The UK prize money is very low compared to other racing nations.
In the UK, people who wish to bet need not go to a race course but can use high street shops or bet by phone or on-line on anything they can think of (e.g. sex of next royal baby, a white Christmas etc). There are also many people who go to the races (some 6 million each year) and bet as part of their fun (mainly small bets) during a very sociable and fun day out with family and friends. A day at the races is probably one of the few times Brits really dress up to the nines. The betting public and the racing public do not always overlap.
In France, betting is a state monopoly and money, a lot, goes back into equestrianism in general.