The desired attitude can get “dragged around” by the actual attitude. This is true for technical and safety reasons, which can prevent the drone from doing crazy maneuvers.
For example, in your case, if the desired altitude stayed at 40 meters, the drone would keep trying to descend by 100+ meters. But what if the measured altitude was wrong? The drone would try to fall into the ground. This “desired dragging” makes sure that the drone never tries to execute extreme maneuvers by ensuring that the desired and actual attitude are always reasonably close to each other.