every step of row reduction is equivalent to multiplying by a certain matrix, so what you're essentially doing is taking a matrix, multiplying it by a bunch of stuff, and getting the identity matrix as the result. by definition, that means all the stuff you multiplied together is the inverse. if you therefore also do all of those operations to the identity matrix as well, then the result is the inverse * identity which is just the inverse