The physician was checking for a hernia. By coughing you were increasing the pressure within your abdomen making any weakness of the abdominal wall more apparent.Turning your head was so that you did not cough on the doc.
S.A.Liroff, M.D.
He is checking if you might have a hernia.