Elementary costing 3: FIFO, LIFO, UFO…
Due to fluctuations in market prices, purchase cost of goods may vary from one purchase to another. Also, you rarely just purchase goods and immediately sell them in the same quantity. What you usually do is that you purchase the goods, then let them sit in the inventory for a while, then you may sell five different purchases all at once, or you may sell goods from one purchase to five different customers.
All of these situations have different effects on your inventory value, because something else must be taken into account: cost flow. Regardless of the inventory valuation method you chose, whenever you take an item from the inventory, how do you know its cost? Without knowing its cost, you can’t know the cost of goods sold, so you better know your cost. Don’t tell me you stick the purchase price to each item, so that you can know exactly how much it cost whenever you are about to sell it, because accountants won’t subscribe to the idea.