For example, Spotify's TOS prohibits recording audio:
8. User Guidelines
Spotify respects intellectual property rights and expects you to do the same. This means, for example, that the following is not permitted: (a) Copying, reproducing, “ripping”, recording, or making available to the public any part of the Spotify Services or content delivered to you via the Spotify Services
There's a question asking exactly this: Program to download music from Spotify