If you look at the context in the parable, in Matthew 20, I believe you will see that Jesus is addressing the issue of spiritual pride. Those who worked all day thought that they deserved more pay, even though they had agreed to their wages before their work began. They were comparing themselves to those who came last and were paid what they themselves had agreed to work all day for.
Jesus had the latecomers in the parable being paid first to set up the tension of the situation and evoke feelings about what seemed unfair to the listeners. It seemed unfair on two counts, that those who worked all day had to wait until last for their wages, and that they didn't receive more than those who only worked after being hired "at the eleventh hour."
The all-day workers prided themselves on their long hours, but forgot their agreement with the boss. They grumbled. Their hearts weren't to serve the boss well to please him, but only for what they could get out of it.
The latecomers were grateful for the job and the pay to which they had agreed. They probably felt a bit sheepish receiving their wages under the scrutiny of the onlooking all-day workers. They may have felt unworthy to be counted among them, but gladly received their wages from the boss with hearts full of thanks. They didn't expect anything more than what they had agreed to.
In heaven, there will be people who recognized God's grace in Jesus Christ at an early age and received eternal life. They will have walked with Him for a lifetime. There will also be those who only recognize His grace for salvation at the end of their lives. They, too will enter heaven, but with less works with which to glorify Christ. His grace to them is no less. They came last, but are "first" in the sense that all who receive His grace are first. They don't demand anything, yet He freely bestows eternal life and blessing.
Those who think they deserve salvation should be wary. If they are working for reward, they may receive it in this life, but the life hereafter will hold nothing for them, because they have rejected what was offered--the free gift of salvation. They come to the front of the line, expecting a grand entrance, but Jesus says, "Then I will tell them plainly, 'I never knew you. Away from me, you evildoers!'" (Matthew 7:23)
Now that someone has edited the question, to include Matthew 9:35, I include the fuller quote here (verses 31-37):
for he was teaching his disciples, saying to them, “The Son of Man is going to be delivered into the hands of men, and they will kill him. And when he is killed, after three days he will rise.” But they did not understand the saying, and were afraid to ask him.
Who Is the Greatest?
And they came to Capernaum. And when he was in the house he asked them, “What were you discussing on the way?” But they kept silent, for on the way they had argued with one another about who was the greatest. And he sat down and called the twelve. And he said to them, “If anyone would be first, he must be last of all and servant of all.” And he took a child and put him in the midst of them, and taking him in his arms, he said to them, “Whoever receives one such child in my name receives me, and whoever receives me, receives not me but him who sent me.”
From this broader, Biblical context of Jesus' words and teaching, it does seem that He is indeed addressing spiritual pride and pride in general.