It's been surprisingly fluid over the history of English. One interesting bit to read about is the history of "singular they", i.e. the use of "they" in sentences such as "if a person wishes to gain access, they must enter the code". This was fairly common in pre-19th-century English, then fell out of favor in the 19th and early 20th centuries as grammarians considered it incorrect ("they" was deemed solely a plural pronoun), and now it's making a comeback as a gender-neutral singular pronoun. The construction "he or she" also has usage going back centuries, as a different approach to that. And as you note, the use of "he" as a stand-in pronoun is also traditional, but falling a bit out of favor lately. Overall I don't think there is one correct answer for how English deals with that situation; it varies across writers and eras.