Records get sorted, not the layout. It probably sorts from a script or script trigger. You'll have to look at the original layout for a script trigger. The script that takes you to this layout may also sorts the records.
You mentioned a problem with a search?
When i manually delete the 3 contacts::xxxxx sort orders and add the Sort List Key on the leads object then the sorting works well and also the find records. I believe I have checked every script or script trigger but for the live of me I can't find any place that sets the sort orders as in the first screenshot of the original post.
Layouts do not have sort orders or found sets. Tables do not have sort orders or found sets. Table occurrences (TO's) do have sort orders.
Layouts are based on TO's, and TO's are based on tables.
To understand sorts and finds, it's necessary to understand table occurrences. Here's a tutorial on the difference between a table and a table occurrence:
A TO's sort order is not permanent. If the sort order is ever lost (like when you close Filemaker), it will have to be 're-sorted' later. The default order is always oldest to newest records.
If you want records in a layout to be sorted whenever you arrive at that layout, you can create a script trigger for the layout "On Layout Enter". The script can be a simple sort script which performs the sort if the records are unsorted, and doesn't perform the sort if they are already sorted.
Henceforth, until the sort is lost, any layout you navigate to which is based on the same TO will have that sort order.
Same rules apply to found sets.
It's worth noting that sorting is one of those things that can be slow over the WAN.
I've attached an image of where a layout's script triggers are modified (using the "Asset" start solution as an example). Layouts are accessed under File: Manage: Layouts
Thank you all for the help. I found what I was looking for. I had copied the sort script for contacts to leads but did not know that I had to click on the radar of line 7 'Sort Records' in order to specify the sort order. Is that hidden or not :-).
Also very hard to find in the documentation. I am not that familar with Filemaker yet.