The flexibility of Legos blocks, for example means, that the child can create anything from a fortified castle for a band of knights, to a two story dream house for a family. You can create a pirate ship for seafaring adventure, or a spacecraft for extraterrestrial exploration. The Batman and Star Wars Lego sets are particularly popular, but the sheer customizability of these sets allows the Star Wars ships to be rebuilt into giant robots. This gives a lot of freedom to kids to develop whatever they want.
In addition, it teaches children how to see their ideas come to life. If you want to build a tower out of these little bricks, it's not enough to just come up with the idea and throw some bricks together. You need to figure out how to put the bricks together in such a way that the tower won't topple as soon as its it's completed. If you want to build something with moving parts, you have to figure out how to use all the little hinges and swivels to allow it to move and yet retain its sturdiness.
In a broad sense, this teaches one of the fundamental facts of life: You can do anything you want, but you first have to learn how it's done.
Thus toys like Legos, Mega Blocks, and even those Fisher Price Little People Builder Sets provides kids with an outlet for their imaginative ideas. Also these are child-friendly because they enable the kids to start small, building little things at first. After they have gained some knowledge of how to go about it, your children can move to more ambitious projects, such as that robotic T-Rex. Its teaches children the patience, through the effort required to build without making the entire structure collapse.