This is intended behavior. The quest is assosciated to the Companion. If the companion is removed (by trading it), the quest fails and is reset. Obtaining the items is part of the quest start, forcing you to give the items again.
While the companions XP progress is saved with the companion, the quest can't be saved on the companion side.