I think you're assuming that the panic happens when a request is received, but it actually happens when a conflicting route is registered.
To me, that's reasonable behavior and is consistent with other things such as https://pkg.go.dev/regexp#MustCompile