If we take what we start the period with (beginning inventory(=asset)) and add the net purchases during the period, we have the total merchandise available for sale during the period. At the end of the period, one of two things must happen to the merchandise available for sale.
It is either still in inventory or it is sold.
If it is in inventory, the cost will appear on the balance sheet as Ending Inventory. If it is sold, the cost will appear on the income statement as Cost of Goods Sold (=Expense).