A question that some my be able to help with,
What happens to a capability like the Harpoon once it is replaced?
Are the reloads kept as backup war stocks or sold on to another Harpoon user?
Is it worth the expense to keep such a capability in reserve?
It really depends, as there are a number of variables which could be involved.
For a US-sourced weapon (and likely at least some Euro-sourced munitions as well) there are likely agreements in place that put restrictions on what a purchasing country could do with the ordnance being replaced. Of course a country could decide to violate those agreements, but in most cases that would just not be worth it.
For a weapon like the Harpoon AShM itself, one should also consider why it is being replaced. If weapon
X is being phased out and replaced because it is nearing or at its expiry date, that would suggest, strongly to me at least, that the cost to inspect and either recertify the munitions as 'good' or carry out the needed maintenance so that the ordnance can still function properly is deemed too high for the capabilities the munitions have.
An example (using made up numbers sourced from the WAG Institute) of a potential scenario would be if the RAN were to consider inspecting and recertifying the existing Harpoon AShM stocks at a cost of ~USD$700k per missile, so that the existing stocks could be kept in service for another five years with their current level of capabilities (range, sensors, guidance, accuracy, warhead size, etc). Or alternately, a new AShM like the NSM could be acquired for ~USD$2.1 mil. with an expected 'shelf life' of 20 years before requiring either recertification or replacement. At some point, the capabilities of older systems are no longer worth the costs to maintain them, particularly when newer replacement systems have been developed and are starting to be fielded.
Yet another potential reason for a munition to be retired (not, AFAIK at least, applicable to the RAN currently) is that the platforms and systems involved in actually making effective use of the ordnance is or has been retired.
From my POV, it would be worthwhile for the RAN to continue to maintain some stocks of the Harpoon AShM for the time being, with some caveats. If the existing stocks have reached their expiry date and replacement stocks of NSM are not available for deployment from RAN or ADF assets, then recertify what can be kept and purchase and integrate NSM as a matter of urgency. If the Harpoon replacement is essentially all ready to enter service but the Harpoons have not reached expiry, then keep Harpoon missiles in service and/or reserve if a buyer is not available for them. If the Harpoons have reached expiry, then either sell of donate them if that is an option, otherwise defuse and destroy them. The final potential option of donating viable Harpoons is also a consideration, but IMO should only happen after Australia's Harpoon stocks have been replaced with NSM.