You can be discriminated against a job based on health records. Scary diseases like AIDS and TB make it hard for unskilled labor to land a job since it's so easy to discriminate. Pregnancy history may hurt women who are in countries with more generous maternity leave.
Mental health history will hurt just about everyone - who wants a worker who can claim ADHD, depression, anxiety, etc as reasons to be unproductive?
Then people will simply deny getting diagnosed for fear that they may uncover something that puts their jobs at risk. That hurts the medical system as a whole.
Combine with weird stuff like eugenics. What if we identify a possible rapist gene and neuter them in advance? Or bar people with a klepto gene from working in finance? You may live in happy, sane, democratic societies today, but it may not be the case 30 years from now.