Any type of surgery carries a risk of infection because of what happens during the procedure. Whenever there is a cut or opening in the skin, there is the potential for infection and while doctors and nurses do their best to reduce the risk of infections, sometimes they still happen.
Without knowing your mother-in-law’s history, it would be impossible to tell why she developed an infection and how it happened. The infection rate for carpal tunnel release is not high, but when the infections do occur, they are painful and cause problems for the patient.