Jesus knew the prophet Zechariah was speaking about him; He deliberately fulfilled prophecy
When they came near to Jerusalem and came to Bethsphage, to the Mount of Olives, then Jesus sent two disciples, saying to them, “Go into the village that is opposite you, and immediately you will find a donkey tied, and a colt with her. Untie them and bring them to me. If anyone says anything to you, you shall say, ‘The Lord needs them,’ and immediately he will send them.” All this was done that it might be fulfilled which was spoken through the prophet, saying, “Tell the daughter of Zion, behold, your King comes to you, humble, and riding on a donkey, on a colt, the foal of a donkey.”
from Palm Sunday topic