Why would an unpopular IG account get hacked?

This recently happened to both my dad and my boyfriend in a short period of time. My dad suddenly lost access to his account and a few days later received an email confirming that his account had been hacked. The account disappeared and he never managed to reactivate it. With my boyfriend was a bit different his account started posting lots of spam and sending spam messages to his followers. Their accounts were not popular at all they had less than 1000 followers which makes me wonder why would someone want to steal or hack their accounts? Their accounts were also public instead of private. Why did this happened and how can you prevent such thing from happening?

Updates
+1 y
Also both are Samsung users.
Why would an unpopular IG account get hacked?
Post Opinion