The manual lists the allowed aberrations in the square wave output. Rise / fall time is < 20 ns typical from 10% to 90%, so a typical DG1022 will take up to 20 ns to rise from 10% the output amplitude to 90%. Overshoot is < 5% typical, so on a rising edge a typical DG1022 will overshoot the high level by 5% of the amplitude. Note that none of these are guaranteed specs.
Edges of square waves contain more high frequency content than for example sines with the same period, so imperfections in both function gen and cable are much more noticeable (hence the difference between high impedance and properly terminated scope input). For square waves the bandwidth depends on the rise time, not on the repetition rate. Sine waves (ideally) contain just one frequency, so an imperfect frequency response will only change the amplitude flatness. The human eye also sucks at visually detecting distortion in sine waves.