Magnetic fields in the quark-gluon plasma: Flow contribution, initial conditions, and CP-odd domains