Read the section of the example preceding this code immediately. You will see that what the example does is apply feedback control in the form of K/s (integral compensation). The feedback is applied through the first input of dcm, which as you noticed is a 2 input 1 output system.
append is needed to compute closed loop transfer function that you get when you apply feedback k/s to the first input channel of 2x1 system dcm. The resulting closed loop system has 3 states because the third state comes from the integral gain k/s.
hope my explanation helps.