Here’s how Apple describes the change when it first launched for iPhone and iPad:
“…members of the Apple Developer Program will see a new option to enable developer betas directly from Software Update in Settings. This new option will be automatically enabled on devices already enrolled in the program that update to the latest beta release. Your iPhone or iPad must be signed in with the same Apple ID you used to enroll in the Apple Developer Program in order to see this option in Settings. In future iOS and iPadOS releases, this new setting will be the way to enable developer betas and configuration profiles will no longer grant access.”
Since then the feature works for the public beta as well as the developer beta and is now available for macOS. Another handy option is you can use a different Apple ID than what is used in your Mac’s Settings for the beta.