If it is an attribute type that includes the below types, this is by design as these attributes aren't sortable.
- Attachment - Single or Multiple files
- Multi Valued Lookup - Number
- Multi Valued Lookup- String
For Virtual Attributes (created on sub-objects), the same rules apply for data types on the master object.