It seems clear that this is either a case of history repeating itself (maaseh avot siman la-banim) or deliberate echoing of themes. Where the author of Shmuel, who recorded the incident of Amnon and Tamar, was clearly was familiar with parshat Vayeshev, in which the selling of Yosef is juxtaposed with the incident of Yehuda and Tamar.
Because it is not just that the woman in play was named Tamar. Look at the following text:
Thus, Tamar is clothed in a ketonet passim, just like Yosef. And she remains desolate in her brother's house, just as Yehuda's Tamar was to remain an almana in her father's house.
And this is followed by the slaying of brothers (including Amnon) as revenge when they go down to the sheep-shearing -- and David hears and mourns. Yehuda's meeting of Tamar was when he went down to the sheep-shearing, and this is juxtaposed with the attempt to kill Yosef, the pretending they killed Yosef, Yaakov's hearing that Yosef was dead and then mourning.
The purpose of such thematic echoes is not clear to me at this time, but I just thought I would make note of the parallels.