There are some jobs that require a medical, and I think those are the jobs that probably want to know these things... but not every single job one might apply for should be required to know.
I know that my anxiety won't change my work as am employee. It makes it hard for me to talk to people, but for some reason, in a working environment, I find it quite easy to talk to customers/clients. It's different to me just socialising at a party or something (which is where I feel quite uncomfortable).
It's unlikely my anxiety would have any impact on my ability to work. Other things in my life are more likely to have an impact on my work than my mental illness. If I felt that disclosing my MI to my employer would make my life easier, then I would... but I see no point in telling anyone, and only see it as a potential risk, not a potential benefit to anyone.