An anomalous optical second-harmonic generation (SHG) signal was previously reported in Sr$_2$IrO$_4$ and attributed to a hidden odd-parity bulk magnetic state. Here we investigate the origin of this SHG signal using a combination of bulk magnetic susceptibility, magnetic-field-dependent SHG rotational anisotropy, and overlapping wide-field SHG imaging and atomic force microscopy measurements. We find that the anomalous SHG signal exhibits a two-fold rotational symmetry as a function of in-plane magnetic field orientation that is associated with a crystallographic distortion. We also show a change in SHG signal across step edges that tracks the bulk antiferromagnetic stacking pattern. While we do not rule out the existence of hidden order in Sr$_2$IrO$_4$, our results altogether show that the anomalous SHG signal in parent Sr$_2$IrO$_4$ originates instead from a surface-magnetization-induced electric-dipole process that is enhanced by strong spin-orbit coupling.