For packaged holidays, there are finite durations available from suppliers. Each package is based on a typical duration, and as such for certain destinations there is no availability for some durations. The durations are grouped to ensure that i.e. if someone is looking for a 5 day holiday, but there are no 5 day holidays available to that destination, that results are still returned and they see the closest duration available.
As a side effect, when a search is carried out, and there is plenty of availability, the visitor sees the best pricing for the duration they are looking for and similar durations. This can result in them seeing better deals, that they would otherwise miss out on.