Men must reincarnate to clear their sins because they study Torah and cannot go to Gehinom, whereas women are not thus protected by the study of Torah and can purify their sins in Gehinom.

Gilgulim really only apply to men and not to women. This is the esoteric meaning of the verse, "A generation goes and a generation comes, but the earth remains stationary forever" (Ecclesiastes 1:4). "A generation goes and a generation comes…" refers to men who reincarnate. However, women are referred to as "earth"; they are forever stationary. [In other words] they do not return in gilgul.

Throughout Jewish literature in general, and Kabbala in particular, the earth is considered an aspect and personification of the feminine. (See, for example, Shaarei Ora, 1, by Rabbi Yosef Gikatlia.) Malchut is the preeminent female aspect of the sefirot, and one of her attributes is "earth". Furthermore, the entire section in the Torah concerning illicit sexual relationships is associated with the "earth", its settlement, and exile from it (G‑d forbid). For example, it is written, "And you shall guard all My statutes and all My laws, and the Land that I brought you there to settle it shall not spit you out" (Lev. 20:22). The earth…takes the place of the widow who is not marrying the brother-in-law…

Similarly, if the brother-in-law does not perform the mitzvah of yibum, then he and his brother's widow perform the mitzvah of chalitza; in chalitza, the "earth" plays a prominent role. He stamps his foot upon the ground, she throws his shoe upon the ground, and finally she spits upon the ground. And the Zohar explains that the earth here takes the place of the widow who is not marrying the brother-in-law to allow the soul of the deceased to come back in gilgul through her.

The Ari has explained the indication from the verse that informs us that men reincarnate and not women. Now, he will give a reason for it, and it is the first reason for this distinction that he is providing here (according to the text of Sefer Hagilgulim and Bnei Aharon).

The reason is that men are commanded with the mitzvah to get involved with the study of Torah. [Therefore] they cannot enter Gehinom because the fire of Gehinom cannot affect them, as it says regarding Elisha son of Abuya. He was not judged because he learned Torah, but they did not give him the World-to-Come either, since he had sinned.

This is taught in Talmud Chagiga 15b, and we have already learned about it in Chapter 4:7. We learned there that the Torah protects against the fires of Gehinom. Therefore, those that learn Torah must reincarnate in order to get purified of their sins. Now we learn, for the same reason, only men reincarnate and not women.

Thus, they [men] must reincarnate to erase their sins in place of Gehinom. Women, on the other hand, who are not [commanded to be] involved with Torah, can enter Gehinom to erase their sins, and they do not need to reincarnate.

[Commentary by Shabtai Teicher.]