Eat healthy. Exercise. Avoid smoking. Why did I get blood clots?

Many factors. There are many causes of blood clots. Anything that slows blood flow in a vein increases risk for blood clots. Common examples are; post surgical (esp. Orthopedic), pregnancy, and delivery by c-section, long plane flights, inactivity, birth control pills, and patients with cancer. There are also certain factors in the blood that can increase your risk. Get tested for thrombophilic risk.
Risk factors. There are numerous risk factors in otherwise healthy persons - medications (hormone therapy, contraceptive pills), long journeys, inherited risk factors to name a few. Many times though a definite cause can not be identified.