This happens to the best of players but must be resisted. Although a shot needs to be on the net to score, a shot that misses the goal is still in play and may rebound in front of the net for a teammate to shoot. By practicing hitting the corners you will make an accurate, high potential shot in the heat of game without consciously thinking about it. The further off center the shooter gets, the more difficult the shot because the amount of open net decreases. After taking the shot, an offensive player needs to continue to skate toward the net to be in position to take another shot if the goalie allows a rebound or drops the puck.
Some players have a tendency to get too close to the goalie before they shoot.
Even if you have beaten the defense and have a clear shot, closer is not necessarily better. If you get within 5 feet of the goalie the amount of open net decreases. The hard shot that has a lot of speed is a combination of good body mechanics and conditioning. Good body mechanics will allow most players to hit a shot that is fast enough to score. However a shot that is hard enough to score even when a goalie sees it requires good mechanics and a conditioned body.