Star Trek is one of the largest and most elaborate franchises on the planet, and in many cases it had to discover continuity the hard way. Star Trek: The Original Series began as a relatively simple science fiction show, as writers just tried to tell entertaining stories and didn't worry excessively about how well their make-believe universe would stand up over the long run. As the franchise expanded into ancillary products like novels and comic books, throwaway details suddenly loomed large, and while careful steps have been taken to establish and maintain organic continuity through the years, the process still results in strange creative hiccups.
Source:https://www.cbr.com/star-trek-andorians-four-sexes/