There are a number of reasons:
First most is when the resistor value needed can not be calculated due to variance in the values of the other components. The pot is to adjust for the component variance. Trimming the input offset of an Op-amp is one case. Another is to match a number of simular circuits to respond the same to the same input stimulus (like the pot on each photo sensor in the linked circuit).
Second is when the designer either doesn't know how to calculate the exact resistor value needed or is unsure of what the circuit will actually do. I commonly do this when prototyping a new circuit I'm unsure of. I'll use the pot to characterize the circuit then use a fixed value resistor for the 'real' circuit unless the first reason exists.
Third is when the set-point that is needed is not known or needs to be set by the user, stereo volume control or an adjustment for the ambient light level.
Do these answers help?