I don't understand why you expected a different result than the one you got!
The function does exactly what its name suggests - it deletes all COLUMNS in a matrix which consist of all zeros.
The function does not claim to deal with the rows, so rows with all-zero values remain intact.
To remove the all-zero rows as well you need a function trimZeroRows( ). But you don't have to write that function, simply use trimZeroCols on the transposed matrix and then transpose the result.

So you can also easily create a trimZeroRowsandCols( ) function in one line:

BTW, here is an alternative trimZeroCols( ) function which does not make use of my Is Element( ) function
