Unlike "hanging out with friends", a universal activity, extracurricular sports actually do conflict with early computer science exploration (they're a huge time sink, as any parent of a kid in a sport will attest).
Meanwhile, sports draws in more boys than girls.
Why are we so quick to accept the notion that after-school activities that girls participate in isolate them from STEM, but after-school activities dominated by boys don't?
As a nerdy teenager, I never had a problem with any girl in any clique or social group at my school. But I sure as shit had problems with the boys in sports.