This behaviour is normal. Each motor is assigned a specific PWM to move your multicopter to the balance position (stay horizontal - in reference with the accelerometer calibration - and maintain current heading).
If the drone flip, the main cause is bad wiring (two or more motors plugs are swapped) or reversed command on the transmitter (pitch usually).
The preflight checks (motor testing) and arming motors without propellers and moving the drone (tilt, roll, yaw) manually to check what motor is increasing is mandatory.
If you have a large multi rotor with bad static balance, high landing legs and small footprint, you can also experience tendency to fall on the side at take off or landing.