Root rot can have two sources, one is a prolonged exposure to overwatered conditions can cause some of the roots to die back due to a lack of oxygen. As they die, they can start to decay or rot away. The rot can then spread to healthier roots and kill them as well, even if the soil conditions are corrected.
The other source can be from a fungus in the soil. The fungus may lay dormant in soil indefinitely and then may suddenly flourish when the plant is overwatered once or twice. The root rot fungus attacks the roots and causes them to die and rot away.
If the plant is slowly wilting and the leaves are turning yellow for seemingly unknown reasons, you will want to check the roots. Remove the plant from the soil and feel the roots. The roots affected by root rot will look black and will feel mushy. Affected roots may literally fall off the plant when you touch them. Healthy roots may be black or pale, but they will feel firm and pliable.