Do you have any objection, then, to passports describing people as zero, one, two or other legged?
I ask as here in Australia we eliminated a straight binary [ M | F ] choice on passports 12+ years ago so that people who were neither M nor F no longer had to commit fraud and lie on official state documents:
We're getting pretty far afield from the teaching of science here. But if you must know my personal opinion, it's that legal documents should allow for exceptions from the norm to be noted where applicable. I would not support the right for a person to select their legal classification arbitrarily though, it should be based on objective biological conditions, such as hermaphroditism.
I think the commenter you’re responding to is pointing out that there should be options for rare exceptions, but for most other people, they’re not committing fraud by marking one option or another, because they can simply change that answer tomorrow. I feel like a boy today, so I marked it on my passport. I am a girl tomorrow, so I change my answer.
The literal answer is that it's a fashion from early 1800's Europe that carried forward, fell out of favour in 1861 when France and other European countries abolished passports and that came back again as World War I loomed. *
I mean that's the history of passports, which started out with an indication of the person, but it's a fair question to ask why the hell are there passports anyway.
( * Sure, you could start with limited issue by King Henry V of England in 1414 but that's really getting in the weeds here. )