They are only indirectly derived from the word "andros" = man.
They are directly derived from the feminine Greek word "andreia", meaning "courage" or "virility", which had been derived from "andros", as supposedly a quality typical for males.
It is the Italian name which has forgotten that originally it was a feminine word, not the English, which has preserved the original grammatical gender.
In Indo-European languages, most of the nouns denoting qualities have the feminine grammatical gender, so "andreia" is not an exception.