I think this is why : It was a foul and the ref said play on cuz maguire had the ball and that’s why he shot it out so the others have the ball (corner) So they get the foul
Its not entirely guessing, its certainly made by either the main coach or the goalkeeper coach and takes stats in account. basically its much smarter than guessing yourself