It does sort by artifact name. A common mistake is that name is different than displayName. If we look at one of the built-in samples source, we can see that while displayName is "[Preview]: Audit NIST SP 800-53 R4 controls and deploy specific VM Extensions to support audit requirements", the name is a GUID, "18e5b847-d4b8-44f6-846a-6698f1af9631". If you didn't explicitly define the name when creating the artifacts, it's likely a GUID and why it appears random from what you'd expect.
You can correct this either by creating the artifacts with a name that matches your expected order or you can customize the sequencing order.