Hooktheory’s algorithms follow some (but not all) basic voice leading rules from classical music theory to make the chords sound good.
See these posts for some more discussion on the topic.
-Dave