When you use your Smart Speaker to listen to music from Spotify, you are using a so-called third party service. This means that the company Spotify is part of the interaction with the your Smart Speaker and therefore gains access to parts of the personal data the Smart Speaker collects about you. If you, for example, ask the Smart Speaker to play a certain song from your Spotify library, certain data about your location and the internet connection your Smart Speaker uses might be given to Spotify. This could also include a written format of the content of your voice command, called a transcript.
How Spotify receives the data from your Smart Speaker depends on the product you are using. However, as is the case for all your personal data, it is first sent to the so-called data centers of the manufacturer. You can read more about it here. From there one it will be sent to a different data-center of, for example, Spotify. Once Spotify has the information about which song you want to listen to, it sends that data back to the data-center of the manufacturer. From there on it will be send back to your device which allows you to listen to the wanted song.
There are two main reasons for manufacturers like Amazon or Google to offer third party services. The first one is that it offers users a broader range of features. If you already have a Spotify account, you might be more likely to buy a Smart Speaker that allows to connect to that account and play songs from there than a device that is not able to do that. This enables the manufacturers to sell more products and therefore generate more income.
The second reason also revolves around money. By allowing third parties to offer their services on the platform of the manufacturers, they are able to understand how you use these services. This information can then be used to gain a better understanding of your preferences and interests. Finally, this information can be used, as described already here, to create more accurate advertisements and therefore generate more income.