It "is legal" but not in hostnames.
Which is the source of the problem.
The assumption in the original DNS was that an A record (although this is an AAAA, since the offending item appears to be IPv6) would point to a host.
This was always wrong - it only ever pointed to an interface (given that you can have multiple ones on a single host it clearly can't be a hostname), but the rule was built into the RFC IIRC).
So bind 4.x disallowed it.
The workaround was to set up a PTR records containing "_" to your A record, which contained "-" instead (since thy were aliases they could be "anything").
Then someone added a compilation option to allow "_" in A records. That must have been in the mid 90's.
Along came bind8 and made it a run-time option.
For someone to have got this wrong 20 years later is just a terrible piece of coding.