That's actually pretty simple to do. I don't know if this is how they did it, but one way is just creating an tag with the href to google.com. that'll show the destination if you hover over it. Then you just add an event listener to the click event, prevent the default event from executing, and manually redirect somewhere else.
Made a quick example: https://codepen.io/Ghoelian/pen/poXeOyo
Oh absolutely. I kinda feel like preventing the default action on a tag like that should just not be allowed, or browsers should not display the target link thing if it has an event listener attached or something.