(I looked this up, I can't pretend I actually knew this)
It comes down to the history of linguistics. Once upon a time, there was a language known as PIE (Proto-Indo-European). This language is the ultimate forefather of some Indian and all European languages with the exceptions of Turkish, Hungarian, Finnish and Estonian. From the link:
'PIE language seemingly had a masculing-feminine construct for nouns, where an ‘aa’ sound added to the end of a male noun makes the noun a female. This rule appears to have passed down to almost every language descended from PIE.
European names like John and Johann become female when appended with long ‘a’ – Joanna, Johanna. There are very few male names that end with a vowel, though – Nikolai, for example. Even with some of the recently derived Romance languages – Spanish, Italian, Portuguese – female names still typically end with an ‘a’ sound, while male names end with an ‘o’ or ‘i’ sound. (Isabella, Donatella, Teresa, Olga, Sofia, Elena, Natalia; Paolo, Antonio, Leonardo, Diego, Giovanni, Rossini)'
Languages that aren't derived from PIE don't have the same pattern, so this rule isn't true of eg. native American languages, east and south east Asian languages, those European languages mentioned above etc.