Many tech companies have to write code to adapt to China's strict rules, including its denial of Taiwan's independent status.
You may have noticed that we're referring to the bug in the past tense -- that's because it's thankfully been fixed as of iOS 11.4.1. And unlike some of Apple's past text-related bugs, it wasn't guaranteed to happen. You could even fix it yourself in an interim fashion by switching back and forth between China and another region. Still, it's not exactly the kind of bug you want to have -- especially not for people who have good reason to talk about Taiwan in regular conversation