While @Peter Gulia reasonably posits/considers that maintaining/collecting any gender information for a DC plan database may be superficial and/or unnecessary, I suggest it may be explained by inertia: the gender data element is merely one of many items that were collected from the beginning of time. It is important to collect gender ID is a defined benefit plan database if that database is used for actuarial valuations and/or determining actuarial equivalency in optional forms of annuity benefit.
Consider a payroll/HR data collection: is it important for an employer to have a gender ID? From a payroll perspective, maybe not; but that data collection was (and is) often used for other purposes, including passing data to providers of medical or life or disability insurance. Hence, it is just one of many data elements of what many consider a "complete" database.
I have also seen such data be one of many clues when there is question about someone's identity. Also, before the days of same-sex marriage, it might be a "flag" to question whether data supplied by a vendor (or plan sponsor) contains errors. For example, suppose the data supplied contains a gender code of M for everyone, but is for a hospital known to have about 60%-80% female population; that anomaly should make you question not only the legitimacy of that data element but also ask about other data validity. Don't laugh, I've seen it.