I haven't seen this request in earlier version of xcode. Why does XCode Helper require this permission?
If you are using UI testing on macOS, then yes, this is legit:
macOS needs permissions granted to a special Xcode Helper app. You are prompted for this automatically on your first use of UI tests.
(see Apple Developer Docs).
This is needed because UI testing uses the accessibility features of macOS to drive your UI during the test runs.