Doctors are expected to mitigate risks, too. Valproate-induced spina bifida is a real problem, it is caused by people who didn’t “mitigate their risks”, and doctors have a responsibility to prevent it when it won’t harm their patients.
Despite what patients often think, doctors are not drug dispensaries. It’s not their job - and never has been - to give patients whatever drugs they read about online. If there is a less risky drug that can treat the patient, they will prescribe that instead.
To take another example, vancomycin is an antibiotic of last resort. Bacteria have not yet developed widespread resistance to it, so it is reserved for patients who have antibiotic-resistant infections. The more it is used, the more likely bacteria will finally develop resistance to it.
Next time you get antibiotics, try telling your doctor “No, I want a vancomycin prescription”. You will be disappointed. They are going to give you what the think is best for you without incurring unnecessary risks