I have been using Anki for learning a language. The deck i'm using seems to often present new words that are "thematically" related together ex. monitor, keyboard, desktop,printer. However, not all words are together like that. For example, the words computer and mouse were presented earlier and at a different times. This doesn't seem to be the order they were added to the deck. I also find that it will usually present words in the same session that have similar spellings but mean different things.
I've found this helpful so far, but how does Anki actually know to do this?