Categories do not need to be immutable. There are meetups for bikers and redditors and many other categories which anyone may self-identify as belonging to. These people prefer to think of themselves as belonging within those categories for any of a number of reasons, and accepting their choice is generally a decent thing to do, barring a compelling reason to the contrary.
The point of the male/female categories is that a large number of people identify as one of those two genders, and prefer strongly to be recognized as within one of those categories. There are exceptions and it's more complicated than that, but in the common case, that's why the categories have value: people ascribe value to them. If recognizing someone's desired identity makes them feel more comfortable, why shouldn't we? In the case of genders, it's especially important since it's such an important category.
Finally, people switching genders on a whim is a strawman itself. Transitioning your gender officially is a multi-year process, and you face significant persecution and stigma along the way. I don't see why anyone would undergo that unless it helped resolve some acute gender dysphoria.