Like Wiggy says, putting in a cost index instead of a fixed Mach/IAS allows the FMC to calculate the optimum speeds continually, taking into account mass, winds, temperatures, step climbs/descents, etc.
There are other reasons as well: our flightplans normally have the diversion planned at CI=0, whatever the CI for the leg to destination, so if you were on a long diversion it could be quite significant, especially if you were expecting to arrive with not much above reserves in the first place...