If you like what’s on offer by Spotify, there’s a free alternative that I like called Spotube. It uses your Spotify account for recommendations but then uses YouTube’s (and YouTube Music’s) backend to get the songs. You can also change the backend use a Piped instance instead of YouTube.
I haven’t seen anyone mention it yet, but a reason might be that providing an API is cheaper than web scraping.
If people really want access to your data, they can just scrape your website, but that requires loading all the data through the website itself which requires loading millions or billions of video thumbnails, comments, descriptions, recommendations, etc. It’s much cheaper for them to send a JSON through an API, even though they might know that some people are trying to undermine them by using that data to circumvent their advertising.