The boards are part of the goal.
A shot that changes direction off a board beats a goalie tracking the puck. A straight one usually does not.