You cannot fly straight in Loiter mode

I have had this problem often.
Through the pitch, I move my quadcopter.
It does not fly in a straight line, but moves about 10 degrees and 15 degrees to the side.
It’s like move roll and pitch together

I wonder what factors affect the flight’s straight flight.

Post a link to a .bin log file please

Thank you for answer.
Currently, i do not have B_logs, etc.
I redo the compass calibration and it is now flying in a straight line.
Are there any other parameters that affect the straight flight besides compass calibration?