They maybe needed to show that nnz works in some variety of cases. Furthermore, nnz is not implemented in eye, only in SparseMatrix.