What is the purpose of putting "gender" on a passport? If there is any purpose to it at all (which I doubt) it is for identifying someone. This person looks like a girl, so female would be more useful on her passport than male would. Obviously his sex is male, but that doesn't serve the purpose of the passport field.
Notice I used pronouns appropriately in the above. I said "she" when referring to her gender, and "he" when referring to his sex.