We have to suggest, if we want this sort of mechanism, that what is now the larva, or the embryo, was once an adult where this sort of mechanism could, with some difficulty, be incorporated into the genome. There are many things that an embryo doesn't do - many things don't have to work at this stage. Mutation, chromos omal change etc. will produce embryos that do things differently, and the adults produced will be subjected to selection. Animals with primitive cilial bands exist as larval forms. The idea of a larval form is in itself interesting.
Embryos normally live on their fat, usually in the form of yolk.
Yet annelids, molluscs and flatworms share a larval form which feeds, and which all look very similar. A little later, after a period of feeding these larvae undergo complex metamorphoses into very different adults. We could suggest that the larva is a primitive form, common to all these types and from which they evolved. Next time we will look a little more deeply into this distinction.