It's necessary, necessities make the forbidden permissible, but I don't know what "necessary" means here.
The scholars say it is not allowed for a woman to travel without a mahram except in one case, which is the obligatory Hajj.
Because Allah, Verheven en Hoog is Hij, says: And pilgrimage to the House is a duty owed to Allah by all people.
This is an obligation, a pillar of Islam, so they said it is allowed for a woman to perform Hajj with a trustworthy group.
The obligatory Hajj, not the voluntary Hajj. The obligatory Hajj, not the voluntary Hajj. As for anything other than Hajj, no, it is not allowed.
Except if there is an emergency situation, like for example, a woman is traveling with her husband for treatment, and her husband dies there, of course she would return by herself, for example.
This is a necessity, and this has been explicitly stated.