Are you sorting in project view or context view? In project mode it sorts based on the due date of the project, except if there is none, in which case it sorts on the earliest due date of any of the remaining actions, it would appear. And most importantly, project mode sorts projects, not the actions inside them. If you want to see which project you need to finish first, project mode would be the place to look. If you want to see which action you need to do first, context mode is the place to look.