Organ systems arose incrementally in form and function. Jellyfish evolved a gut with a single opening, a ring of muscles, and a nerve net with no central control.
Flatworms have a single opening, but with different sides for intake and elimination. Flatworms also have a definite head-end for their still-meager nervous system.
From there the evolution of digestion proceeded.
As with sponges, endosymbiotic microbes were essential in breaking down chemically complex nutrients which animal cells were unable to process as efficiently.
Socialization became as important as specialization, starting with microbial association. There is some irony that multicellular eukaryotes, even as they became more ‘complex’, have always relied upon prokaryotes that retained relative ‘simplicity’. Such interdependence is the ecology of life.
While new genes and proteins arose with speciation, antecedent genes were conserved: brought forward through eras of genetic and cellular innovation, in case earlier genic knowledge proved useful again. In many cases it did, though often with a twist of adaptive application.