Simple as that. In every sport that I can think of that has a scoring area like a goal or a net, it's right smack up against the boundary of the field. One of the most interesting things for me about hockey has always been the ability to play from behind your adversary's goal.
I feel like r/hockey could answer that better. I honestly never thought of that. it could be because it makes it easier to move the puck around with the ablity to wrap around the net.
Just so you know, this feature is also present on a Lacrosse field.