I’m glad you brought up hockey. Imagine hockey without an offsides rule. Just imagine.
Notice hockey’s offside rule is completely different, it encourages good defensive play, and still allows the breakaway pass. Soccer’s offside rule encourages bad defensive play, and primarily functions to disallow the breakaway pass. Imagine soccer if after a steal on the perimeter your fast center man could run at top speed to the goal free to pass slower defenders before the ball is passed to him. Just imagine.