I also have seen single albums or songs becoming unavailable. It's not coding errors really, there are other reasons behind this. Let me bring you some examples.
One artist had a few albums missing because the label that put them up had finished its activity and the albums were taken down until rights were sorted and the new label could re-upload them. Similar issue happened to another distributor that had all sorts of game soundtracks. It did give time for artists/rightsholders to move their content elsewhere, but many didn't do it in time and became unavailable.. until the rightsholders sorted it out.
A third major distributor did changes and had to temporarily take down all albums the changes affected. Lots of metal lovers were annoyed and saddened not to be able to listen to their favourite tunes, but the distributor reached out in here and explained what's going on.
There are metadata edits that also include some content becoming unavailable, and the process takes a bit of time.
I love Amon Tobin and two of his albums on Spotify are incomplete. 2 songs (one from each) are completely missing and highly unlikely returning, and it's not only on Spotify, it's so on every streaming platform. None of the platforms did anything, something else happened probably in connection to sample clearance.
Which is a shame, these 2 songs are absolutely splendid tunes.
Regional licensing and restrictions are still a thing, eg a version of an album is available here, but not in that other country.
Spotify can't keep songs available when their licenses are unclear and changing, it would cause a lot of legal issues.
I understand it feels very teaseful and annoying to open Spotify just to find your favourite album incomplete or completely missing, but it's not Spotify's fault.
As much as I love Spotify for its vast libraries, I too can't really put up with the possibility of a favourite song/album disappearing, so I maintain my local library of lossless music files, so if all else fails, I can still listen to the unavailable 4 Ton Mantis.
I understand it might not be enough, but I hope this clears it up a bit. 🙂
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.