First, let's call things by its name: in this case, when you say animation, you mean transition
Not everything has to have a function, aesthetics values usually mean more than function (sad but true). It's basically the history of mankind and civilization. A gold Rolex will give you the time as accurately as a cheap digital watch. But.... would you prefer a gold Rolex or a cheap digital watch? Even considering duration as a differential (a Rolex will certainly be more durable than a cheap digital watch), you could buy 1000 digital watches for the price of a gold Rolex.
Transitions are meant to create focus on elements, and as such, they're extremely powerful. Personally, in our studio we don't even consider a site without transitions: when we work on wireframes, transitions are included in the whole planning, including all parts of such transition (effect, time in, time out, etc)
From Enhance Your User Experience with Animated Transitions
Animations don’t only offer aesthetically pleasing goodies, but can be
real user experience enhancers too. It’s key too find the right
balance between fun and function and make sure your user flow is great
without animations too. A good transition is one that is not
obtrusive, enhances the user experience and is fun at the same time.
You gave Spotify's example, and Spotify's usability is known to be really bad, yet.... would you say they're doing bad because of this? Wouldn't you love to have just 1/100th of Spotify and hang on with the bad UX? And this is just an extreme example. You say transitions like these are pointless, yet it's evident some people think otherwise.
IMHO, these transitions call attention as content blocks (you'll see they animate on each click scroll using lazy loading, although this is just anecdotic, they could have loaded without this technique and just have a transition ), so they're grabbing attention to the content inside those blocks. To be honest, I would argue that not very effectively since they're focusing attention on the phones instead of the message, but well, the lousy UX is also part of their brand and I guess they might have tested this
In short, it all comes to each site's testing and research, then study the results: do the transitions affect the site's UX in a negative way? If so, then it's bad. If not, then why worry? If they bring something to the table.... well, the answer is obvious.