To limit the probability of insufficient penetration, which could lead to nail pull-out, which could lead to inadequate joint strength, which could lead to an inability to resist expected vertical or lateral loads, which could lead to fastened elements detaching from supporting members.
This is to limit the probability of compromised structural integrity, which could lead to:
This is to limit the probability of harm to persons.