Although Taipei is the Capital of Taiwan. Here is an extract from the link below.
In English-language news reports the name Taipei often serves as a synecdoche referring to Taiwan's national government. Due to the ambiguous political status of Taiwan internationally, the term Chinese Taipei is also sometimes pressed into service as a synonym for the entire country, as when Taiwan's governmental representatives participate in international organizations or Taiwan's athletes participate in international sporting events.
https://en.wikipedia.org/wiki/Taipei