tl;dr These two values must match:
- The Sitecore site name (In SXA, the "Site Name" field of the /Settings/Site Grouping/SiteName item)
- The item name of the storefront ("/sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/ShopName")
The way that all links together is very odd. I'm guessing it's due to legacy reasons, and hopefully it gets cleaned up in a future release:
Commerce Connect (which has no knowledge of SXA) determines the name of the shop using the Sitecore SiteInfo's Name. In SXA, this is the "Site Name" field on the /Settings/Site Grouping/SiteName item
Commerce Engine creates the Shop entity if it doesn't exist, but since it only has a string (the name) it goes back to Sitecore to pull the information from the storefront (dizzying, yes). So it expects an item "/sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/ShopName" to exist.
There is a hard link from SXA to the Storefront, but it's not clear why it doesn't get used to resolve the shop name (and thus reducing it down to a single source of truth). I'll need to do more research, but I suspect there may not have been an appropriate pipeline to extend.