Many countries do this for immigration. In New Zealand they say your test result doesn't affect your application. Whether that's true I don't know.
Canadian immigration wanted my full medical history for Permanent Resident status, and there was a medical check, blood work, and a chest xray for TB. I was in the US military with injuries from that, and they asked for all of the paperwork.