An excellent question! As I discuss in Chapter 3 of my book, the SAS/IML language passes arguments by reference, rather than by making a copy of the values. Therefore, "any change made to an argument in a module also changes the matrix that is passed into the module." (Programming Tip 3.4.4)

A programmer should be careful to not change the input data, unless that is the stated purpose of the module. Because I do not want to reshape the matrix that the user passes in, I made a copy of the matrix in the shape that I need.