Code zh-tw means the Chinese variant used in Taiwan. The technically correct code for Traditional Chinese is zh-hant.
It’s an entirely separate issue from the flag, but the developer technically should label the languages “Chinese (China)” and “Chinese (Taiwan)” in the dropdown instead, to better correspond to the flags.