Some kind of 3rd party shenanigans notwithstanding, there really is only a single way a followed manga should get unfollowed on MangaDex, and that's by pressing the unfollow button and explicitly OK'ing the dialog. Looking at the code, that is literally the only entry point for deleting a follow row from the database, and despite some of the spaghetti, it's pretty unambiguous.
The only other way I would expect follows to get dropped would be if there's a bug somewhere that updates the follows wrong - for example, the user id somehow getting mixed up - but I'm not seeing anything that would suggest it could happen, and I don't think anybody has ever complained that they're randomly gaining new follows which would be expected.
Certainly it would make no sense that the database itself is somehow bugged and dropping rows randomly, because not only is that just not how databases work, but if it did surely it would affect some of the several other tables as well and not just this particular follows one.
There are enough reports of these "random unfollows" happening that it's difficult to just dismiss it, but I can't find any logical way it would be happening by accident. The only things that makes sense to me would be:
- the user misremembers following a title on MangaDex
- the user intentionally unfollowed one but forgot about it
- the user's little brother is pulling an epic prank on them and unfollowing titles
- the user tried following a title but due to 503 / DDoS protection / whatever freak accident the follow didn't actually go through and the user didn't notice
- the user does in fact properly follow a title but due to some unknown bug it's not showing up in the Follows page (which would be different from the follow being randomly deleted)
- some kind of a 3rd party issue that I have no idea about (tachiyomi?)
All this said, the part of the code that defines the actions does need to get completely rewritten eventually. Hopefully that magically solves the issue, whever we get to that.