A balaclava-clad boy slapped a pensioner in the face out of “instinct” after the elderly man grabbed his shoe and then pushed him to the ground to defend his friend, a murder trial has been told.