There are many reasons for this. The typical cause of this is because the item is sold before all of the costs are in. If an item gets sold for $1 but then the final cost is $1.10 you have a cost variance of $0.10. This has to be adjusted out manually. There are many other reasons for this to occur.
Using PO and proper receiving procedures will help to reduce the number of occurances but a fact of life is that inventory often gets sold before the cost is fully known.