Total knee replacements are usually done because a patient has severe osteoarthritis or rheumatoid arthritis of the knee, or has had a severe trauma or injury to the knee that is causing a lot of pain and difficulty with movement.
Your mother's doctor may have looked at the amount of pain she is experiencing when she walks and how it may be limiting her life. If she can't walk without a significant amount of pain, or has difficulty going up and down stairs, or getting in and out of chairs, this can be affecting her quality of life. If her pain is severe even when resting and she's not responding to pain relievers, this can affect how she sleeps and even how she feels about herself.
It could be that other treatments, like physiotherapy, have also been tried but without much success.
Immobility and social isolation are big problems among our older citizens and it's important for them to be able to maintain their independence as long as possible.
Of course, your mother's doctor will also ensure that she is healthy enough to undergo such a surgery.