think that way: If what you are trying to calculate is a COST, in this case variable one, then it doesn’t matter how many units you have sold, the cost arises in producing level, so what it counts is how much cost to produce x units. Then calculating revenue or profit you’ll take in account how many you have sold.