Admit it. You get it wrong sometimes. I don’t care how many degrees you have, how steeped you are in the highest register of formal discourse, how vicious you are with the red pen, how many children’s wrists you have slapped with a ruler. You sometimes write there when you mean their or they’re.
Yes, you. You may catch it every time, correct it before pressing “send,” but you do it. The language just makes it so easy to do. Not only are these three words pronounced exactly the same, they are all constantly in use in everyday discourse. Wait and weight or flour and flower just aren’t as frequent. Most people aren’t going to mix those up. So there’s no reason to be especially proud of not mixing them up, or to make smug memes about them. But there/their/they’re is a cleverly laid, dastardly trap. To tout your mastery of this trio is an act of pride in your ability to skip over the trap.
So who set this trap? We did, of course, which is to say all the English speakers who came before us. First, in the earliest stages of Old English, we had the word for "there," which was then spelled þǽr (thǽr). The word for "their" was hiera, so there was no problem telling them apart. But when Scandinavian settlers starting coming over around the year 1000, we started borrowing a few things from them, including their word for "their": þaire (thaire).
Now we had two words with somewhat similar, but still different pronunciations and spellings. The following centuries brought a huge upheaval in English pronunciation through the Great Vowel Shift and the development of Middle and Modern English, while at the same time the spread of the printing press and literacy brought stable spelling conventions into being. Through all this, there at one point or another got the spellings thar, thaire, ther, yar, theer, thiar, and thore. Their went through its own changes with thayir, thayre, yaire, and theer. Sometimes they overlapped and had the same spellings, sometimes they didn’t, but when the dust settled and the final habits had been established, we were left with one pronunciation and two spellings.
The latest entry into the trio was they’re. People didn’t write contractions of this kind until the late 16th century, though they did say them before then. Writers began to use the apostrophe to stand for missing letters, as it does in 'tis or o’er. It couldn’t be helped that "they are" shortened into a word that sounded just like their and there. The same thing happened to I’ll/aisle and we’ve/weave, but aisle and weave didn’t show up often enough to turn the similarity into a trap.
It didn’t have to be this way. If things had gone differently, we might have ended up with one spelling for all of them, or at least for the first two. This is what happened to rose (the flower) and rose (the past tense of rise), or rock (stone) and rock (to sway). Those came from totally different words that began to be pronounced the same, and then came to be spelled the same. (Chaucer wrote of “the son that roose as rede as rose.”) Those words don’t cause any confusion, and neither would a word like ther, if that’s what we had somehow ended up with for all members of the trio.
But that’s not what we ended up with, and so we add there/their/they’re to the long list of things that make writing harder than speaking, things to keep track of, double check, and correct, lest you fall into ther traps. Ther everywhere.