Why use ECB inside Entities.ForEach().Run()?

Hello. Can someone please help me understand the purpose of this sample code:

   var commandBuffer = new EntityCommandBuffer(Allocator.Temp);
        var networkIdFromEntity = GetComponentDataFromEntity<NetworkIdComponent>(true);
        Entities.WithReadOnly(networkIdFromEntity).ForEach((Entity reqEnt, in GoInGameRequest req, in ReceiveRpcCommandRequestComponent reqSrc) =>
        {
            commandBuffer.AddComponent<NetworkStreamInGame>(reqSrc.SourceConnection);
            UnityEngine.Debug.Log(String.Format("Server setting connection {0} to in game", networkIdFromEntity[reqSrc.SourceConnection].Value));

            var player = commandBuffer.Instantiate(prefab);
            commandBuffer.SetComponent(player, new GhostOwnerComponent { NetworkId = networkIdFromEntity[reqSrc.SourceConnection].Value });

            commandBuffer.AddBuffer<CubeInput>(player);
            commandBuffer.SetComponent(reqSrc.SourceConnection, new CommandTargetComponent { targetEntity = player });

            commandBuffer.DestroyEntity(reqEnt);
        }).Run();
        commandBuffer.Playback(EntityManager);

Specifically, why is there a need for ECB when the thing is supposed to Run() synchronously?

Oh, sorry, I think I remember now. The structural changes would break the query. The buffer is needed not only as a sync point but also as a delayed application of structural changes.

You create entities and and add components to both new and existing entities.
Then also remove request entities. All happens, when ECB is executed.