Having different actions intertwine in non-trivial ways and likely interfere with one another is bad because you can’t easily reason about it.
This is easy to reason about:
Flatten each child, join the flat children.
That is also all you need, so the other reason is that it doesn’t give you anything - you input a child through a parameter and get the flat version back through the return value. No other communication is useful, that already covers everything.