Double entry accounting is based on economic theory that every economic transaction has at least two parties. Economic transaction between unrelated two or more individuals involves transfer of economic resources. One party will not be prepared to give something without taking something of equal value.
For every outflow of economic resource; there must be equal inflow of economic resource and for every inflow of economic resource; there must be equal outflow of economic resource. Economic resource can be monetary and non-monetary (property, plant & equipment), tangible (inventory) or intangible (goodwill, account receivables, patent, copyright). It gives rise to the principle of double entry accounting.
In context of retail industry:
Outflow of cash (credit) in return for goods purchased (debit).
Inflow of cash (debit) in return for goods sold (credit).
Profit, if any, reflects the cash inflow (debit) in return of selling & distribution services (credit) provided.