MPU6050 Gyro value going back to initial value irrespective of Angle

Both are indeed correct, but in the second case, the variable is guaranteed to be initialized to a useful value. It is a good idea to use the second form.