I am a female programmer and started really young. In 7th grade, I remember being afraid that people would find out I liked computers and had a website. I was afraid of standing out and being labeled a nerd. I didn't know any girls who liked computers and probably wouldn't have signed up for a program that wasn't specifically for girls. Being a kid in middle school is a tricky time and having a safe environment to learn and be yourself around like minded people can make a big difference.
To this day, I still feel quite a bit more comfortable at women coding events than tech talks where I am one of 3 women with 100 guys. I definitely think specialized groups can provide a more conducive place for learning when you're in a minority group. I think calling it discrimination is a bit short sighted.