You can grant third-party apps and services access to your Apple Music for various reasons. For instance, you might allow Alexa access so you can play Apple Music on your Amazon smart speaker. But if there comes a time when you want to revoke access to an app or service for privacy or security reasons, you can do that easily by following the steps here.
How to see and stop apps from accessing your Apple Music data