Bilobate comet morphology and internal structure controlled by shear deformation