Tiktok probably generated a unique link to the video just for you when you shared it so that whomever the recipient is will know that you shared it. And then your friend opened said link and tiktok connected the dots and linked the accounts in a DM with the video. Pretty easy for them to do on their end, and they probably see it as a convenient feature to users.
Also, lost fedditors