One of the reasons for this to happen is that some of the records in those columns may consist of FNFs (Field not Found). For example, if you sort a column numerically and few of your records in that column consists of string characters, those records in that column will result in FNFs when it tries to convert the values in the column into numerical values. Then sorting that column consisting of FNFs will exclude the rows with FNF. This is the reason you may have ended up with less number of rows after the sort.
If you want to still keep these records after the sort, you need to replace the FNFs with a value. You can refer to this topic to get more information on how to go about it: https://discourse.xcalar.com/t/how-do-i-convert-a-fnf-to-a-value/190 .
To learn more about working with a table containing FNF, you can refer to this section of the online documentation.
Let me know if this helps.