Hi Ji Ho Choi,
We need to stack widgets to animate the flip easily and properly. Imagine not using a Stack: you will have to control the moment you will switch between the two widgets. Flutter, on its side, may have to change its render tree accordingly to the new widget.
Using Stack and drawing both widgets cost a little bit more, but is more convenient for the purpose. Also, the default implementation of the layout builder uses Stack; that's an extra hint for thinking we don't have to optimize it.
Last but not least, you can customize Stack to ensure that front and rear widgets will have the same size. (I'm not sure it's guaranteed in my example).