Finder by default lists directory contents alphabetically regardless of whether it is a file or a folder. This could be confusing for some especially if you're coming from
Linux environment where folder is listed first before files.
Finder can however be configured to list folder first from its preferences options.
Steps to sort folder first for Finder in macOS:
Comment anonymously. Login not required.