Weak Forms vs Strong Forms
The is not special in this regard, and it has no unique pronunciation history of its own. You just have to know when to use its weak form and when to use its strong form, something we see all over English with many, many other words like this.
The Wikipedia article mentioned in the references given at the end of this post contrasts to Cambridge before a consonant yielding /tə/ with a reduced vowel with to Oxford before a vowel yielding /tu/ with an unreduced one. You get the same thing happening with the when especially stressed or before a vowel. This shows it is a general phenomenon not one peculiar to the.
The definite article the is no different from many other monosyllabic function words.
Content words take prosodic stress in English, but grammatical words usually do not. These common function words are subject to “reduced pronunciations” whenever they occur in unstressed positions. This phenomenon is not unique to English; for example, weak forms also occur in neighboring Dutch.
Many one-syllable function words in English have phonemically distinct
weak forms found in unstressed contexts that contrast with their more
fully pronounced strong forms. Weak forms have reduced vowels (usually
schwa) and sometimes reduced consonants as well. Not all dialects and
speakers have the same set of weak forms, and further constraints on where
weak forms appear may apply to some of these.
Examples of function words with weak forms include a, an, and, be, been, but, he, her, him, his, just, me, or, she, than, that (as conjunction), the, them, us, we, who, you, your. Weak forms can also be found in some utterances of as, at, for, from, of, to, some, there in some contexts for some speakers, as well as in are, can, could, do, does, had, has, have, my, must, shall, should, was, were, will, would.
What you see happening with the definite article is the same thing that you
see happening with the indefinite article, which is also always weak
- Would you care to try a berry?
Only the content words in (1) are unreduced: care, try, and berry. That
leaves you with only /jə/ for you, /tə/ for to, etc.
But when stressed for emphasis, the indefinite pronoun a is now pronounced /eɪ/:
- I guess I can try a berry, but just one, please.
Before a vowel, of course, a becomes an. There aren’t many other
function words that end in vowels, but the is one that does so, and to
is another. The reduction to schwa that normally happens before a consonant
is less apt to occur before a vowel. So while (3) would have weak forms
for to and the:
- Try to sleep in the bed.
Here in (4) before the vowels those two words won’t be reduced, or as reduced, for most speakers:
- Try to eat the apple.
Think of how when we say You don’t have to shout, the word to is reduced to /tə/, and the word have devoices its final consonant. These are the same phenomenon at work that you see with the in unstressed positions and before consonants.
- The section on “Weak and strong forms of words” in the Wikipedia article on Stress and vowel reduction in English.
- Geoff Lindsey’s Youtube videos about the pronunciation and prosodic rhythms of weak forms: 1, 2.