The primary reason that soldiers carry shovels is to aid in digging defensive positions or protective cover. In the event of an attack or other emergency situation, a reinforced hole can provide much-needed shelter from enemy fire. By digging a small trench or foxhole with their shovels, soldiers can quickly create a barrier to shield themselves.