A small percentage of SSSSes truly are random. But it sounds like yours might have been due to the fact that you were flying HA with no HA frequent flyer number in the record.
If your boarding pass doesn't have the FF# of the carrier whose equipment you're flying on, you're more likely to be haraSSSSed. I've noticed that I'm SSSSed about 50% of the time I fly United, since I credit my United flights to my US Airways account.