Sometimes just a masculine form is used to indicate a profession/occupation (though a female form may exist). Преподаватель, врач, доктор, педагог are the examples. In this case grammatically they are treated as masculine gender: e.g. Она - мой преподаватель (She is my teacher). The masculine form sounds more formal, so in some professions they prefer to use this form (a female form преподавательница may be used occasionally in less formal contexts, however sometimes such female form may not exist). Another example is a female driver - the masculine form водитель is used and treated as usual masculine gender (it happens there is no female form).
As for личность, it should be treated grammatically as female gender regardless of the gender of the indivudual. Grammatically it declines like abstract nouns слабость, краткость, etc.
I hope this answers it.
PS In some professions the distinction is always clear: актер - актриса, танцор (танцовщик) - танцовщица. Probably the explanation is somewhere in traditional gender roles and the fact that initially some occupations were not available to women.