The `name` attribute on `a` elements is classed as “obsolete but conforming” in the #HTML spec, which is shortsighted when you consider hypermedia uses (e.g., htmx or Kitten, which extends upon htmx to provide a Streaming HTML workflow) where it is perfectly valid to use name attributes on any control that could trigger a server-side action to differentiate between elements. The id attribute does not function in the same way as it is not automatically sent to the server.
https://dev.w3.org/html5/spec-LC/obsolete.html#obsolete-but-conforming-features