In Afghanistan’s deeply patriarchal society, sons are highly valued over daughters — to the point where a family is deemed “incomplete” without a boy.
That’s why an alternative was invented dressing a daugther as a boy and let her live her life as a boy. This is the so called “bacha posh”.
The boy/girl will live her life working as a boy, helping the father, dressed as a boy and having a real boy life till when it’s necessary. After that, if still psicologically stable, she can have her life back changing her habits, marrying herself and turning herself in a girl again.