html – Why does an anchor tag in href point to the root domain?

I have a URL on a page on which I am

https://url.com/some-content/

In this page, there is a button that refers to a valid identifier on the page. that's how it makes

Click me

When I click on (or hover over) the link, it brings me to the root URL.

https://url.com/#important-stuff

instead of the expected

https://url.com/some-content/#important-stuff

There is nothing about these buttons and there is no basic tag in the HTML code.