Spiking the ball at the snap is a legal play, but it also results in a loss of down. The quarterback isn't spiking the ball to avoid defensive pressure; he's spiking the ball to stop the time. In most circumstances, it is only done when time is of the essence. For example, with 1 second left on the clock and no time-outs remaining, a coach might spike the ball to try to get his team into field goal range. However, this is not recommended because it gives the opposing team all drive time. In college football, a player can spike the ball to stop the clock with no penalty as long as they do so before the next whistle. If a player spikes the ball after the whistle has blown, then it is a foul that can result in a penalty if committed intentionally. An example of an intentional spike is if a player does it on purpose as part of a play called by their team (i.e., not as a mistake). In the NFL, players are not allowed to spike the ball until the referee signals for play to resume. This is to ensure fairness between teams who may be trying to run out the final seconds of the game without giving their opponents any chance to score. The rule is there to prevent coaches from using this tactic to give themselves more time to set up for a possible game-winning field goal or overtime session.