I probably should have been clearer. I think application of progressive enhancement can help answer that.

I consider a tab or disclosure widget, when done with progressive enhancement like the one you linked, to be a great example of using anchors. My own effort at an ARIA-enabled tab panel also uses anchors.

However, I have also built an experimental modal that relies on JavaScript (no PE), and so the button makes sense as there is no anchor to fall back to.

If I revisit that to work sans JS, then likely I’ll find those buttons are better served as anchor links.