I wrote Apple’s security team and this was their response:
Hello,
Thank you for contacting the Apple Product Security team. We take every report of a potential security issue seriously.
After examining your report, we do not see any actual security implications because it requires knowledge of the device's passcode. If two-factor authentication is enabled, it is expected behavior that any trusted device can change the password with the device passcode. Additional information about this feature is available in the "Two-factor authentication" at
https://support.apple.com/HT201487.
Please note that we recommend that users use a strong device passcode to prevent unauthorized access to their device. As always, physical security remains an important part of protecting the data on your iOS device.
We look forward to your future reports.
Best regards,
Alex