Betting bots aren't necessarily illegal, but they are frowned upon, both by iGaming companies and other players.
There are several reasons why bet365 accounts can be restricted, including matched betting, unreasonable betting behaviour, GamStop (self-exclusion), and exploitation of bonuses.