Number one reason was & still is to to removed devitalized tissue & prevent fatal infection. Tissue without blood supply will die. Dead tissue rots. Rotten tissue is gangrene. That will spread & kill the patient. Still true even with antibiotics.
In the days before Alexis Carrel figured out how to repair, reconstruct & replace blood vessels, bleeding injuries required ligation of the vessel stopping flow to everything down stream. Bad, but better than bleeding to death.
Other reasons are insufficient soft tissue to cover exposed bone which would get infected, to prevent persistent pain from nerve injury, to have a wound that will quickly (or actually) heal. Often a mangeled limb is more trouble than a well healed stump.
Today, we make great efforts to save limbs. However, i have seen patients who have multiple operations, recurrent infections & complications from antibiotics that leave them permanently debilitated, often without success in saving a usable limb. In retrospect, they would have been better served with a quick clean amputation and rehab when they were still strong.