Tanya: Chapter 6

The Baal HaTanya speaks here about children, and about how having a small da'ath makes them want small things of little value. At the very least that explains what is so vexing about children vying for meaningless trinkets with such determination.

Moreso though, I think this nature of children helps a parent to grow along the lines of another point made in this chapter: HaShem doesn't rest His Shechinah on something that is not batel, nullified, to Him.

Children's pettiness directly challenges a parent's patience, bringing the parent as well to a place of mochin d'katnut. (The Komarna Rebbe describes a similar relationship between a Rebbe and the generation in which he lives in his introduction to the sefer Heichal HaBerachah)

The only way out of this quagmire is for the parent to relinquish his own self, nullifying himself or herself to the role of the parent, and recognizing that only through divine inspiration can the parent succeed in dissuading their child from their stubbornness.

In short, our relationship with our children can bring us closer to God, and simultaneously give us a better perspective from which to see how much patience HaShem has with all of our own petty luxuries and selfishness.