Speaking generally, the disciples did not share Jesus' perspective on children, childlikeness, and childlike faith.
You may say, "But that does not explain WHY they didn't share Jesus' perspective. Were there cultural, psychological, social, ethical reasons why they felt the way they did?"
Good question(!), and I'll address it shortly, but think about it: Whenever Jesus told His followers NOT to do something (which they should not have been doing in the first place), it was because they did not share His divine perspective. The disciples' perspective therefore deserved a rebuke.
Mark tells us (10:13-16) Jesus was "indignant" when He saw what His disciples were doing. He would not have been indignant, I suggest, had the disciples NOT been taught somewhere along the way that Jesus is no respecter of persons but treats all people who genuinely seek Him, with love, dignity, and respect. After all, He was the friend of publicans and "sinners" and even women of ill repute (e.g., the "Woman at the Well," John 4).
Moreover, Jesus was big on faith, belief, and trust. People asked Him, "What shall we do to do the works of God?" His response: "Believe on me!" Since children, generally speaking, tend to believe, trust, and have faith in what adults (particularly parents) have to say, they serve as good role models for adults in the matter of faith. In Jesus' day, the religious establishment, by and large, found it difficult to believe Jesus wholeheartedly, and they consequently plotted against Him, trying to catch Him saying something controversial or to trip Him up with "difficult" questions.
In Luke 18, the context included Jesus' teaching on the superiority of the humility of the publican ("God, be merciful to me, a sinner") to the self-exaltation and justification of the Pharisee ("I thank you that I am not like the other people . . . I pray . . . I pay tithes . . ."). In Mark 10, the context included some Pharisees who tested Jesus with their questions about divorce. Perhaps, then, the disciples thought, given this milieu of criticism, suspicion, hatred, and resentment, that Jesus had "bigger fish to fry" than to "waste time" on children.
Jesus, however, not only loved children and encouraged them to come to Him to be touched, blessed, and prayed for (Matthew 19:13-15), but He frequently referred to His grownup disciples as "little ones" or "babes" (e.g., Mt 11:25 and Lk 10:21 KJV).
As an aside, the disciples may have been familiar with the story of Ismael ("God hears") in Genesis 21:17, where we read,
"And God heard the voice of the boy; and the angel of God called to Hagar from heaven, and said to her, 'What troubles you, Hagar? Do not be afraid; for God has heard the voice of the boy where he is.'”
Hagar is crying, but God is moved by the cry of a little boy (though I'm sure God cared about Hagar, too!). There is also the story of the Hebrew children whom the pharaoh at the time wanted killed, but Moses' mother and her midwife (as well as all the Hebrew midwives) defied the ruler's order and preserved the lives of the babies, including Moses.
I could go on and on citing instances in the Tanakh where children were elevated to the status of full personhood and significance in the outworking of God's plans and purposes, often from birth (e.g., Isaac, Jacob, Samuel, Samson), and instances of God's miraculous dealings with mothers (some of whom were barren) and their children (e.g., Sarah and Isaac, the widow of Zarephath and her son, a child--1 Ki 17:17-24).
In short, in this part of my answer, the disciples would seem to have been schooled in the importance of children and what they represent vis a vis faith and trust and their sheer intrinsic value (see Psalm 8:2 KJV).
As for cultural factors at work, there are a few noteworthy ones. As historian Richard Saller points out,
"The Roman father [paterfamilias] was a powerful type, because he possessed almost unlimited powers within the family, according to later Roman law. He had the power of life and death over his children, meaning that at birth he could choose to raise them or kill them, and later he could punish them by execution."
Moreover, to Romans in at least the century before Christ and the century after Christ, they generally did not distinguish between abortion and infanticide. If a given child was not a boy, for example, she could be thrown in the river to drown. If the child was a "mistake," either abortion or infanticide were permissible (Saller).
Within the Roman ethos in this regard, then, the disciples' attempt to keep the little ones from Jesus was certainly not on the same level as killing children, but it may have reflected a pervasive attitude at that time that children were relatively unimportant. By the way, the epistles which would come later in the church's history, included sections on God-approved family relations, making it clear to the early Christians that the family unit is indeed important and that roles within the family are to be played out in a spirit of love, respect, and mutual submission.
In conclusion, I think the first section of my answer is perhaps stronger than the second section. The disciples had simply failed to assimilate the values of the Tanakh regarding children, and the values which informed Jesus' dealings with children in general, and His teaching in particular.