@rbreich when you read economics texts pay attention to the words 'all other things being equal' and especially 'perfect' as in perfect competition in other words, a theoretical state that does not exist in reality.
What you do find in reality is that price moves to maximize profit per unit.