Certainly! Humans can do this too; computers are just more consistent at it.
In general, language usage doesn't just come down to what's grammatical and what's not. A man or a woman can say "I like apples" and have it be equally correct.
The differences come in when there are multiple ways to express the same concept. For example, Jespersen(1) conjectured and Mondorf(2) demonstrated that women tend to use significantly more finite adverbial clauses(*) than men, and women tend to put them after the main clause, while men tend to put them before.
Why is this? Nobody's going around shouting at men "you have to put your adverbial clauses at the beginning of the sentence or you'll sound feminine!". Rather, it's the same reason so many Americans pronounce the "R" in "bird" and so many Brits don't. That is, it's what they've heard people doing, and so they pick it up from everyone around them, without ever being formally taught.
Sometimes it comes down to a larger social pressure (adverbial clauses at the beginning tend to show higher commitment to the statement; after, they tend to show lower commitment); sometimes it's just arbitrary (vocal fry is now more associated with women, but in the past it was associated with men). Either way, though, the differences are definitely there, and can be picked up on. Humans tend to get a "gut feeling" or "intuition" about the author's gender, without knowing why, while computers can just say it outright.
(The same holds true for any other factor, by the way: nationality, race, social class, and so on. This is one of the reasons why "blind" hiring processes don't work as well as people expect. Even if a job application doesn't mention gender, it'll still include markers that people can subconsciously notice, and subconsciously react to.)
If you want to look further into this, it generally falls under the umbrellas of pragmatics and sociolinguistics. Searching for "gender differences in English" will also bring up some good articles.
(1) Language: Its Nature, Development, and Origin, 1922
(2) Gender Differences in English Syntax (in the Journal of English Linguistics), June 2002
(*) Clauses with a conjunction and a finite verb form, which don't act as a subject or object