Prices of substitute and complement goods are held constant in the demand curve for a good. As well as Interest rates, savings, people's preferences, and people's knowledge about everything but one...
it isolates are factors and only look at one cause and effect at a time. This is why the demand curve is a liner equation (straight line). It wouldn't be possible in real life.