From the Wikipedia:
The contents of each client’s cache is summarized in an index which is sent to the Spotify stream hub upon connecting to the service. This index is then used to inform other clients about additional peers they can connect to for fetching streamed data for individual tracks being played. This is accommodated by each client, upon startup, acting as a server listening for incoming connections from other Spotify users, as well as intuitively connecting to other users to exchange cached data as appropriate. There are currently no official details from the developers about how many connections and how much of a user’s upstream bandwidth the Spotify client will use when streaming to other users; the Spotify client offers no way for the user to configure this.
So basically it’s like a music BitTorrent thingy.
In general I think it’s sketchy when companies have their users provide bandwidth for them. Spotify prides themselves on having almost no buffering delays. Maybe this is why.