Despite the fact that the two words are interchangeable in some certain context, there are some shades of meaning.
As a verb,
replicate = (1) reproduce … as a more desired result; (2) repeat the procedure for making … because the new outcome is wanted
An artist replicates a painting probably because the original one is missing or damaged. In trying to replicate it, the artist expects to get a new copy of the painting, which would be of much importance in the absence of the original painting.
Most cells in our bodies keep replicating themselves because old cells are bound to die. From a biological perspective, new cells are always more wanted than old ones, aren’t they?
duplicate = (1) make … double (duplic- = two) when the original is also desired; (2) repeat … unnecessarily
A team leader duplicates a notice probably because this notice needs to reach multiple team members at the same time. In trying to duplicate it, the leader expects to have two or more copies of the original notice on hand. Of course, the original notice is not useless.
If you live alone, you may want to duplicate the key to your unit (to have two or more copies of the key in reserve) so that you won’t be inconvenienced when the only key gets stolen. If not, the original key still serves you, though.
More often than not, you may want to delete duplicates (as a noun) of the photos on your phone because few people would need duplicate (as an adjective) digital images and they only need to keep the original versions.