The clinic I work at doesn't ask about orientation, but the basic intake forms do ask for both sex and gender. Mostly because they want to make sure to get pronouns right, but also because they do a lot of musculoskeletal work, and that does get impacted by the physical sex.
(For instance, I didn't know this until I started working there, but apparently a male's iliac crests are higher than a female's. So if you are looking at low back / lumbar pain, for example, and there's pelvic dysfunction of some sort, then where the pain goes and how it manifests will be different for a male or a female. I don't remember all the specifics but there were a few cases where it made a surprising difference. Like if it was actually a hip issue, and the SI joint or the low back was trying to compensate, the areas of stress would be different? I think? I need to ask about it again, that feels fuzzy as a memory.)
Not that that helps figure out the mystery of why they'd want to know sexual orientation.