If you don't wish to answer, just cross them out or write N/A, and exert some sense of maturity.
As others have stated, this is a relavent question if you are being prescribed some medication that has known psychological side-effects. It is there so that your physician can weigh the benifit of the medication with the potential risks.
Also, as DIVEMedic said, and as I will also attest, HIPPA is a very scary piece of legislation for healthcare providers. Basically, it says that if you have so much as a slip of the tongue that can remotely lead the identification of a patient, that slip of the tongue can result in a felony conviction for you. All because someone found out John Q. Public went to the doctor for a tummy ache. Yes, its that merciless, and its very hard for most lay people to relate. If you're in the medical profession you live in a sort of communist state with the specter of thought-crimes looming over you.
As a result, most health-care providers tend to be skittish about talking about patients with anyone who is NOT a health-care provider. From my end, I will only hesitantly talk to family about a patient's medical history, never mind a stranger or anyone else not directly connected with that patient's care.
Also, keep in mind that Doctors are in addition to being Doctors are also Scientists, Epidemiologists, and Public Health officials. While 99.999% of the populace only sees a doctor as someone who fixes their boo-boo, many doctors also conduct research and publish in peer-review journals. It is not uncommon for an MD to both be seeing patients and to also be presenting studies (based on their patients, or patients at their facility) at professional meetings or in medical journals. In fact, its not rare for some MDs to divide their time 50/50 between practicing medicine and research.
And that is the reason why there is that small seemingly random and inconsequential question on a questionare that makes you go "why'd they want to know that?!" Check it, you might be helping to improve either medicine, public health, or both.