Because in those situations the resistor only generates heat. The resistor does not affect the way the rest of the circuit is analysed, unless the circuit is a heater or needs the heat source.
An ideal voltage source will maintain the ideal voltage, no matter how much current it must supply.
An ideal current source will provide sufficient voltage to maintain the ideal current, no matter how much voltage is dropped across the resistor.