The phrase is of military origin. Bag and baggage referred to the entire property of an army and that of the soldiers in it. To 'retire bag and baggage' meant to beat an honourable retreat, surrendering nothing. These days, to 'leave bag and baggage' means just to clear out of a property, leaving nothing behind.
The phrase is ancient enough that the earliest citation isn't in contemporary English. Rymer's Foedera, 1422, has:
"Cum armaturis bonis bogeis, baggagiis.
The earliest reference in English that most would understand is in John Berners', 'The firste volum of John Froissart', 1525:
"We haue with vs all our bagges and baggages that we haue wonne by armes."
Shakespeare later used it in 'As You Like It', 1600:
"Let vs make an honorable retreit, though not with bagge and baggage, yet with scrip and scrippage."