You are in the "large file" regime (and maybe I should update that).
When you open a file and the index window is not sure if the records are sorted, it sorts by the first column. When I started GEDitCOM II (about 20 years ago now), computers were slower and automatic sorting not requested by the user could cause unexpected loss of response while it finished. To solve that, the window DOES NOT automatically sort for any record type with more than 10000 records, which for you is individuals where you have 16983. Normally records are saved as sorted the last time you opened the file and should be OK when reopened and still be sorted. But, as you found out, manually inducing a sort by any column will fix it.
Things I will do for next version are:
1. Revisit the 10000 limit for automatic sorting. Computers are a lot faster now and that number can probably be increased without causing long delays (I tested in files with a million individuals and things got very slow). I did write the sorting code using old-school computer science of sorting to make it as fast as possible (which means I could not use some Apple built-in methods that did not seem to scale very well). It is also possible better methods have appeared and should check them out. My current sorting speed (and I think the limit of all sorting methods) should be on order N log N, but that means sorting 1 million records is 150 slower than 10000, which is why I wanted to place a limit on automatic sorting.
2. A file saves its sort order. I would have thought if you saved while names were sorted, they would be known as sorted when reopened. I will check that coding too.
In the mean time, click a column header to resort if things do not look correct. In the worst case, it should only be needed once every time you open the file. If #2 is above is working as I intended, it should only be needed once, ever.
Regards,