The aspects are shown in the document properties view form, in the order that you specify or configure in Alfresco Share forms. If not configured these XML forms properly, it may seem that they appear ramdomly. If you are using Model Manager instead, you can sort and edit these forms with Layout designer, viewing their final form.
If you refer to the sorting order in Manage Aspect dialog as Jan mentioned, you should see the order listed in the visible aspects of the DocumentLibrary section in share-config-custom.xml file. And after these visible ones, they should appear the aspects defined in Model Manager. But for those aspects, I would say that the order I see in Manage Aspect dialog is the creation order in the model (although in Model Manager page, the aspects are sorted by aspect name). Surely, this order may be replaced in share-config-custom.xml config or even exporting/changing order/importing the model from Model Manager.