Bookmakers will suspend betting on a market if they believe the current odds are no long a true reflection of the probability of all possible outcomes. Bets can be suspended for a variety of different reasons and during this period, bettors are unable to cashout their bets.
A potential red card in football, or a withdrawal from a favourite in a golf major, or a horse has been declared a non-runner, sports betting is often suspended while the bookmaker recalculates the odds that they will offer on a particular market. It is not illegal for bookmakers to suspend betting as much as a bet being suspended can annoy a bettor. They use it as a form of protection as they are all about making money and being as profitable as possible.