Very true. However, having a woman in a lead technical role to provide mentorship and inspiration to female developers is very important for encouraging more women to become developers and stay in the industry.
A female involved in hiring might mean the process is less discriminatory. Thus a female influencing hirings wouldn't necessarily be illegal, but potentially more legal.