The backpackItems command does not only return items, but also magazines.
Let's say you do:
_backPackItems = backpackItems player;
And:
{ (unitBackpack player) addItemCargo [_x, 1]; } forEach _backPackItems;
This will return an error, because it cannot add the magazines as weapon class.
There is also no need to include magazines, since we have the magazineCargo command for that.