From Sheldon Brown:
Ferrules
Ferrules are small metal caps, usually nickel-plated brass, which fit over the end of a piece of cable housing. They help keep the housing aligned with the cable stop it fits into. Whenever possible, you should fit a ferrule on each end of a cut piece of housing. Some housing stops/adjusting barrels are too small to fit a ferrule into, so you don't always need to use one. Such stops will generally be a snug enough fit that they will act as a ferrule. The use of ferrules is particularly important with compressionless housing.