When using a chest factorio takes items from chests in reverse order effectively picking items in locked (red) slots first.
This is especially good when previously using a unlimited chest as a buffer and wanting to change to a chest limited to 1-2 slots. Items are taken from locked slots and only refilled if the unlocked slots clear up.
Transport drones seem to pick the items in the "normal" order from slot 0 up to slot n instead of reverse from slot n down to 0
This is very annoying if you change the locked slots in a provider because you'd expect the drones to get rid of the items in locked slots first.