This was a calculated move by the Taliban.
If women start speaking up for themselves, and gain rights, education, etc... the country will improve. It's basically that simple.
As the welfare of the country improves, the Taliban's chances for keeping power dwindle. Organizations like the Taliban can only stay in business if the country they're residing in is an absolute shithole.