The injection and acceleration dynamics of electron bunches generated by two different optical injection mechanisms, the injection by an orthogonally crossing pulse with perpendicular polarization and injection by a copropagating preceding pulse, are studied by means of 2D numerical particle-in-cell (PIC) simulations. The effect of the ion cavity (bubble) shape variations induced by injection pulses on the electron bunch formation and observable parameters is explored for early injection and acceleration phases. Even if both schemes have three different injection regions, from which three independent electron sub-bunches emerge, the final merged electron bunch does not exhibit a significant substructure in studied parameters as transverse and longitudinal emittance. The 2D PIC simulations also reveal that the final electron bunch parameters are mainly affected by the spatial charge distribution of individual subbunches. Further, the model of the electric and magnetic fields within the slowly evolving ellipsoidal bubble is derived. The electron trajectories in acceleration later stages are analyzed by employing this model for the dynamic changes in the bubble size observed in PIC simulations.