Anki rebuilds the study queue after most operations (such as changing the current deck or syncing).
Relevant post: