Ground bearing capacity is the pressure that soil can safely support without failing or settling excessively, usually expressed in kilonewtons per square metre. Foundation width is calculated so that the pressure the building applies stays within the allowable bearing capacity of the soil beneath it.
Every soil has a limit to the pressure it can take. Dense gravels and rock can carry high pressures; soft clays, silts and peat can carry very little. The engineer calculates the load per metre run from the building and divides it by the allowable bearing pressure to determine how wide the foundation must be.
Allowable bearing capacity is not just about avoiding failure. It also incorporates a limit on settlement, because a foundation can be nominally safe against collapse while still settling enough to crack the building above.