Generally, the purchases of merchandise are sold in the year they are acquired. Hence, it is logical to match the current period's purchases as expenses on the same income statement that reports the current period's sales revenues.
If some of the purchases are not sold in the same period, there will be a change in inventory. An increase in the amount of inventory will appear on the income statement as a deduction to the current period's purchases. It is a deduction because some of the costs of the current period's purchases are not associated with the sales shown on the income statement. The deduction is reporting that some of the costs of purchases are being deferred to a later period when they will be sold. The deduction is necessary in order to achieve the matching principle: matching the proper amount of the costs of the goods sold with the sales revenues of the accounting period.
A decrease in the amount of inventory will appear on the income statement as an addition to the cost of the purchases. This recognizes that some of the sales included some costs of purchases that were made in an earlier accounting period.