To show that even at childhoood you will be known if you're righteous or not.
Can you differentiate a wicked from a righteous child?
Yes. A righteous child wants to praise the LORD.
Matthew 21:16 (Amplified Bible)
21:16 And they said to Him, Do You hear what these are saying? And Jesus replied to them, Yes; have you never read, Out of the mouths of