Text would be rendered in a render stage of C2 engine, the render stage comes after logic stage. After rendering, text width and height could be got. So it needs 1 wait(0).
run event -> render -> run event ...
But I had no idea why it needs 2 wait(0) under "on start of layout".