Note that the cost of goods sold is not simply the cost of purchases during the period. This is the application of the Matching Concept which requires expenses to be recognized against periods from which associated revenue from the expense is expected to be earned. Therefore, as closing inventory is not consumed at any given accounting period end, it must not be part of expense which is why it is deducted from the cost of sale. Similarly, as opening inventory is consumed in the current accounting period, it must therefore be added to the cost of goods sold.