If there was a good way for people to determine site visitor gender, I bet they would do that too.
I realise that the data is a bit more complete when you are looking at movement on the street, so an officer taking the data would have more 'useful' information than that acquired from a user visiting a website, but that surely doesn't mean that collection of such data is wrong?
It's like if an old lady sitting on a porch kept a tally of the genders of people walking down the street each hour - all you are doing is automating the old lady.