The course of a peritrichous bacterium, such as E. coli, crucially depends on the level of synchronization and self-organization of several rotating flagella. However, the rotation of each flagellum generates countermovements of the body which in turn affect the flagellar dynamics. Using a detailed numerical model of an E. coli, we demonstrate that flagellar entanglement, besides fluid flow relative to the moving body, dramatically changes the dynamics of flagella from that compared to anchored flagella. In particular, bundle formation occurs through a zipping motion in a remarkably rapid time, affected little by initial flagellar orientation. A simplified analytical model supports our observations. Finally, we illustrate how entanglement, hydrodynamic interactions, and body movement contribute to zipping and bundling.