It's actually quite common for doctors to write "off label" prescriptions, including using cancer drugs to treat migraine headaches or blood pressure medication for heart failure.
One study found that 1 in 5 prescriptions written in doctor's offices has not been approved by the Food and Drug Administration to treat the condition it is being used for.