It's really a misnomer for Praat to call it "pitch." What Praat calls "pitch" is f0. These are not the same; pitch is a psychoacoustic phenomenon, f0 is a property of periodic signals. Creaky voice is often perceived as low in pitch, but it has no periodicity at all.
Praat's f0 estimates are based on
autocorrelation. At each time point in a signal, an autocorrelation looks back in time over a range of lags. The lag that achieves the highest correlation is the wavelength of the fundamental frequency. You have to specify how far back you are willing to look; these provide hard bounds on the highest and the lowest fundamental frequency you can find. This is why Praat requires you to provide the pitch range.
Note that this is
not the same as looking for a voicing band in the spectrogram and finding its peak. That technique will fail if the voicing band does not exist. Telephone speech does not include energy below about 400 hz; there may be a lot of noise at low frequencies; and so on. Autocorrelation can still recover the fundamental frequency by relying on the harmonics. Even if the fundamental is gone, the signal will contain the harmonics, and they will all hit their peaks when the fundamental
would have hit its peak (in the time domain) if it were there.