The way the law phrases it: “If an offence occurs when the ball is not in play, this does not change how play is restarted. If the ball is out of play, play is restarted according to the previous decision.”
I think it's essentially just a get out of jail card for referees, otherwise they'd be...