Any bit of stress can bring it out but it all starts with genetics. Having a pH similar to tomato juice probably doesn't help. Bending the stems wouldn't have caused it by itself, I don't believe.
Sometimes plants will hermie even in perfect conditions. If you get rid of its pollen sacs, it may be a normal female after that, but the odds aren't in your favor.