One bag can hold a certain volume.
BagA has X volume empty
Y= stuff in the bag
BagA has X -Y = Z volume
Now if you have BagB for example, BagB's total volume cannot exceed Z (or X if its empty)volume or it simply won't let you put it into the other bag.