Congratulations, you are #52396 in a never-ending series of users falling into this trap :-)
OmniFocus has two notions of sorting. You can sort the display, or you can sort the data.
When you use the View bar settings, or the View->Sorting command, what you are doing is sorting the display order. If you are in a project mode display, the sorting is done on a project-by-project basis, so sorting by name would put projects whose name started with 'A' before projects whose name started with 'B', and so on. In a context mode display, the sorting is done on individual actions, not projects. This is particularly useful when you are trying to figure out which actions have to be done first, because it takes all of the actions and sorts the ones with the earliest due date to the top of the list, regardless of which project they are in. In project mode, it would by sorting by the due date of the project, not the action. A project which was due in three weeks, but had a task that was due today would show up lower in the list than a project which is due in two days but has no individual actions due before then, and I trust you can see how this might lead to poor choices of what to do next.
Regardless of what you use it for, the View->Sorting command only affects the window in which you apply it. If you have another window showing the same data, the data as seen in that other window will not change.
There is also a sorting function in OmniFocus which will actually rearrange your data. For example, when you create a new project in OmniFocus, it goes to the bottom of the sidebar if you don't have another project already selected. After you do a big brain dump, your sidebar might be quite a mess. Here is where you would want to sort the data, just as if you had dragged the projects into order, except without all of the clicking and dragging! Select the items you want to sort (whether they be projects or contexts in the sidebar, or rows in the outline), then choose Edit->Sort->(your sort key) or use control-or-right-click to bring up the contextual menu and choose Sort->(your sort key).