Many a time a parent or some other person has mistakenly checked "female" instead of "male" on the birth certificate, or visa versa. That, or a filing error or some other mistake. Such mistakes are rarer nowadays, because of computers, but they still occur.
English-speakers have "whoopsie"-ed this way too. Just check out the popularities for Jennifer, for example.
Proud adopter of 15 punctuation marks; see my profile for their names.