What are you trying to accomplish by performing these concatenations? In your code for “ssto1”, you are performing concatenations of model objects, specifically state-space models. For “sstot2” you are performing matrix concatenations and then assigning those matrices to a state-space model. This method seems to be the correct one.
MATLAB has no way of understanding that by your concatenation, you want the matrices “A11” (“A12”) and “A21” (“A22”) multiplied by the same states. By the operation you are assigning to the system “ssto1”, MATLAB thinks you are combining multiple systems and adds additional states to the concatenated system by putting the matrices beyond “A11” on the diagonal and modifying the “B” and “C” matrices accordingly.
By pre-concatenating the matrices as performed in “ssto2”, you are explicitly saying which components of the “A” matrix should be multiplied by which states, which components of the “B” matrix should be multiplied by which inputs, and which element of “C” are multiplied by the states.
The following MATLAB documentation page might be of help for combining multiple state space models: