Where did the meaning of Jesus entering Jerusalem riding on a donkey come from?
One clear answer comes from the second to the last book in the Old Testament, the book of Zechariah.
He lived about six hundred years before the quoted verse below was fulfilled.
Rejoice greatly, O daughter of Zion!
Shout aloud, O daughter of Jerusalem!
Behold, your king is coming to you;
righteous and having salvation is he,
humble and mounted on a donkey,
on a colt, the foal of a donkey.
Zechariah 9:9 (ESV)
When Jesus rode into the city sitting on a little recently born donkey it symbolized that (1) he is a conquering king and (2) he is coming to bring peace.
Another important quote from this prophet is verse 10 in Chapter 12.
And I will pour out on the house of David and the inhabitants of Jerusalem a spirit of grace and pleas for mercy, so that, when they look on me, on him whom they have pierced, they shall mourn for him, as one mourns for an only child, and weep bitterly over him, as one weeps over a firstborn.
Zechariah 12:10 (ESV)
A much different mood will come in less than a week on the day now designated as Good Friday. And as just stated, it will be a mixture of grace and bitter mourning.