It may not be just the execution element. Lots of men's prisons ask that female visitors wear fairly conservative clothing. Women that I know who work or volunteer tend to go further than required, they wear pants generally, flat shoes, no jewelry, and so on. They almost go out of their way to look pretty gender neutral or even dumpy.
Possibly that's not "fair" but I think actually it is completely justified to recognize that a woman coming into that space has quite a different set of things to think about than a male.
Exections take place in the prison so the same rules likely apply, even though in some ways the same issues won't be involved in terms of dealing with prisoners. But even if whomever was in charge on the other occasions let it pass it doesn't mean se shouldn't be observing the dress code.