This is so, so important.
For the gender example - I think most systems don't even need this information to operate. However, I suspect the info can be useful for understanding who is using the system (or more importantly, who isn't). I know some non-binary people may disagree with that latter assessment though; I'm not sure it's a settled issue. It's definitely something I need to understand better.