What happens if a pdf that has an hidden url of a website A is uploaded to website B

What happens if a pdf that has a hidden url of a website A is uploaded to website B. Is it a good practice to gain links to a website in such a way? Has anyone come across such a scenario of providing links unknowingly to other websites. What are its pros and cons?