From well before the days of the internet, related things have been said to be “linked” to one another, similar to links in a physical, usually metal chain, and this terminology was adopted early on in tech. The web runs on “hypertext transport protocol” — that’s the HTTP in the address bar — and text with embedded data like a URL was said to have a “hyperlink.” This was quickly abbreviated (or rather, de-elongated) to “link.”

The symbol for the link is most commonly two or three links in a chain: two arranged so as to resemble an infinity symbol (though with no association with that concept), or one central link with two halves of other links intersecting it. My rendering above shows how, as the symbol has become more commonly implemented and recognized, it has been compacted and simplified to the point that it looks more like a paper clip (“attachment”) than a section of chain. But this has been taken advantage of in that it is nearly as intuitive to “attach” a link as you it is a document or file.