Since you have had the surgery , I guess your doctor have told about the cause of this. Is it Osteomyelitis? If the surgeon can't tell the reason of foot amputation, I also can't provide more credible information.
The cause of Osteomyelitis
Infection is caused by blood-borne microorganisms (blood-borne osteomyelitis); spread from infected tissues, including replacement joint infections, contaminated fractures and bone surgery. The most common pathogen is Gram-positive bacteria. Osteomyelitis caused by Gram-negative bacteria can be seen in drug users, patients with sickle cell disease, and severe diabetes or trauma patients. Lesions of fungal and mycobacterial infections are often confined to the bone and cause painless chronic infections. Risk factors include wasting disease, radiation therapy, malignant tumor, diabetes, hemodialysis, and intravenous medication. In children, any process that causes bacteremia may induce osteomyelitis.