This happens because the balance is not right and you need to adjust the pitch roll, yaw and throttle accordingly so that while lifting up the drone maintains a horizontal position parallel to the ground.
In conclusion, learning how to fly a drone can be a lot of fun and can earn you some extra cash, but there are processes and maneuvers you must master before you risk crashing your drone, or worse, causing bodily harm.