In MATLAB, fields are not internally sorted for struct. struct('A', 1, 'B', 2) is not compatible for assignment or concatenation with a struct with the same content but fields reversed.
struct in MATLAB is not an abstract mapping of field names to content: struct fields are ordered in MATLAB.
Ordered fields is what is used in C and Fortran. struct in computing is tied to memory layout: once a field is created it is always at the same offset in memory, so it can be compiled as indexing that does not need to change as new fields are added (unless field reordering is done.)
There are, in computing, more general unordered mappings between names where the offset could potentially change as more fields are added. MATLAB offers containers.map for example.