Why does every inanimate object have a gender in french?
Old English had gendered nouns as well, but lost them (I believe) following the Norman invasion of England, following which English got heavily mixed with French (which is why, to this day, 60% of English vocabulary comes from French).
French, of course, also has gendered nouns, but the genders were not the same as in Old English as in French. In the mixing process, the genders were lost.
A similar process, incidentally, took place with Afrikaans (which started off as Dutch, but was very influenced by French and other languages). Dutch has gendered nouns; Afrikaans does not.
Gender is used to identify articles. It's not just for gender like "boy" or "girl" same with many with most languages. English does not have a grammatical gender. The only gender that is identified is only between boy and girl. Gender should not be focus on the most, gender is learn during the learning process. So all you need to do, is remember each article a word has when seeing it.