Why does Mandarin Chinese have a smaller inventory of unique syllables?
From San Duanmu, The Phonology of Standard Chinese:

While Middle Chinese (about AD 600) had over 3,000 syllables (including tonal
distinctions), modern Standard Chinese (SC) has just over 1,300. Thus, over a period of 1,500 years, Chinese lost more than half of its syllables. Moreover, the syllable inventory of modern Chinese continues to shrink. In addition, about 200 of the 1,300 syllables in SC are now rarely used. From a functional point of view, what is happening in Chinese is quite counter-intuitive and mysterious: why is it that the high homophone density has not prevented syllable loss in SC or at least slowed it down? I suggest that there are two parts to the answer. In the first place, most lexical ambiguities are clarified by context. For example,
although sun and son are homophones in English, there is hardly any context
in which they would cause ambiguity. Therefore, homophone density
rarely impedes how people speak. Secondly, paradoxically, high homophone
density may in fact speed up syllable loss. Studies on frequency effects show that frequent words are more likely to undergo reduction than infrequent words (Bybee 2001). Because Chinese has fewer syllables than
English, Chinese syllables are used more frequently, and so they are more
likely to undergo reduction and loss of contrasts.

On the other side, the reason why there are so many homophone words in Mandarin is that it is a monosyllabic morpheme language, which means that every syllable corresponds to a character with a meaning—a word. Other languages like Japanese, might have a smaller number of different syllables but also less homophone words, as they do not require each syllable to be a word.