When a tool breaks, you place the last of an item stack, eat a food, or other action that causes an empty hotbar slot a new stack from your inventory is pulled in. This may be something already in the hotbar. For instance, you might have a stack of 25 dirt in slot 1 and a tool in every other slot. If the tool in slot 5 breaks it might be replaced with a stack of 25 dirt. If you place a block from either of these stacks their values both decrease. The same will happen with tools, and when using them both of their durabilities will decrease equally.