They didn't hire "for the sake of hiring" -- they hired specifically to build up their podcasting and audiobook efforts, which were totally new products within the app. Which they thought were essential to staying competitive -- e.g. what if people start moving over to Amazon instead with its Music+Wondery+Audible, or other competitors?
Now it's turned out those bets haven't been as successful as they wanted, so they're keeping them but massively scaling back on future investment. Which means they don't need those employees anymore.
Honestly, what do you expect Spotify to do? Not try to stay competitive, and risk a competitor taking their place, and then go the way of Pandora? Do you think it's wrong to hire teams to build products when you hope the products will succeed but you can't know 100% for sure?
This is just how normal, healthy business goes. You make bets, sometimes they succeed wildly, and sometimes they don't. When they don't, it often results in layoffs because there's not enough profit to keep paying those employees with, and there isn't immediately any new product for them to work on.
Believe me, a company with profit margins as thin as Spotify's can't afford to "hire for the sake of hiring". That's just not how it works.