Doctors are not required to take nutrition courses. They are not required to know a thing about fasting. Because if something bad happens to you on the fast, you cannot say I didn't tell you to check with your doctor. It's a precaution that does have its merits. Unsupervised fasting can be dangerous.
Modern medicine can be more dangerous.
The contraindications are a VERY LONG list of things that can go wrong when you take a medicine. Every medicine that a doctor will give you has them. The contraindicators can be anything from a rash or headache, to death. The list is usually quite long with all medicines. This is the stuff that can happen that we do not want to happen.