When you unlock an advancement in your Settlement with Diamonds, the Diamond price is reduced based on how many of the required goods you already have. This means that the goods you already have are still being used up when you use your Diamonds (the same applies to all Settlements, such as Vikings and Feudal Japan, for example).
To make it a bit clearer, in this example (Vikings Settlement), with no axes, the price is 105 Diamonds.
With 5 axes, the price is reduced to 80 Diamonds:
In this case, using those 80 Diamonds to get the missing 5 Axes and Diplomacy will still reduce the Axes to 0, as they served to reduce the overall Diamond cost.