Why is 之 used in this sentence?
Cant it just as easily be substituted with 的?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Chinese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Chinese language. It only takes a minute to sign up.Sign up to join this community
之 and 的 are essentially synonyms for different contexts.
之 is mostly used in set phrases, idioms, proverbs, poems, etc. (Also math with percents and such: 百分*之*百 100 points out of 100. )
的 is more fit for colloquial contexts.
Since 忍耐是幸福之门的一把钥匙 "Patience is the key to the door of happiness" is a phrase, it is fit to use 之.
Another reason is to avoid using the same word again and again in the sentence. To make it easier to read and understand, in sentences where you get related 的, this adds variety.
is easier to understand than:
usually, you may translate x之y to "y of x". Not applicable in ancient Chinese.