Your personal details are not normally collected nor tracked for returns with a receipt, although they can still request ID. Returns without a receipt are usually put on an HD store card, which is similar to a HD gift card.
If you make excessive returns without a receipt, they can refuse to accept the return in the future. HD asks for and records your personal details for any returns made without a receipt in their system to mitigate and combat fraud. How would they tie anything to my license though? I returned some stuff earlier in the summer and they swiped my credit card, which I used to purchase the items in the first place, but my license would mean nothing to them.