STCON in L using matrix multipication algorithm?
A machine runs in logarithmic space if the working space it requires (excluding the read-only input and the write-only output) is at most logarithmic in the number of bits required to represent the input.

For matrix multiplication, the input is the two matrices, and the output is their product. The only working space is, as you say, the "loop counters" for stepping through the current row and column to compute the next bit of the output.

For graph connectivity, the input is the adjacency matrix of the graph, along with the two vertices of interest, and the output is the single bit "yes" or "no". Your proposed algorithm requires remembering the matrix of paths you've discovered so far, which has size $n^2$, and that's not logarithmic.