If you are an end user who would like to avoid getting caught in this situation, you might want to switch to using F-Droid [0] as your primary source of Android software. The selection is more limited, but because everything is open source and distributed outside of Google's walled garden, you can be sure that it won't be arbitrarily removed because of the whims of corporate bureaucracy. I write this not as a dogmati…
How does f-droid police "shovelware and spyware"? Or just outright malware? Surely they will remove it? In which case your favourite app might be "arbitrarily removed"?
This is of course the same issue we all face when opting to pull in an OSS dependency for our own projects (from npm or docker or rubygems or rust crates or...): we need to decide on our own how far to trust the software maintainers.
The android permissions model offers some degree of protection in both stores from hostile software. However, unlike the Play Store which offers only a couple of tags (contains in-app purchases / contains ads), in F-Droid any known "antifeatures" (i.e. association with paid services) are listed explicitly in the catalogue.
As for abandonware (or other software that F-Droid drops for practical concerns), users could still acquire the code and build it themselves, which means that a developer stepping away from a piece of software does not mean a user needs to say goodbye.