The 5% contingencies to trip fuel may be used by extra fuel burn due to not flying at the optimum altitude, flying around weather being radar vectored around traffic etc.
These figures are generally calculated before the flight by dispatchers based on weights winds temps etc etc.