Or theirs could be available in another store, and you copied theirs from there.
So, I suspect Apple just wants to stay out of it, let courts decide based on a collection of evidence (and whomever has the money to pay for lawyers, and time to do all the proceedings), and profit no matter who wins.
I seriously doubt this has ever happened in the history of the App Store.
Scammers are "lazy". The look for the easy targets. Copying an existing app is easier and more lucrative than trying to write a new app based just on some in-progress screenshots, as if scammers would even be paying attention to you before you published an app.
Don't know about the App Store, but people have copied in-progress websites and did copy-cat products (sometimes complete with the original artwork/styles).
I wonder if they had bought website visit statistics via e.g. Alexa? And in the app store, they'll see how many downloads? ratings? already existing apps have, and can decide, based on that?
Meaning, "who was first" can work fine, most of the time?
> "theirs could be available in another store, and you copied theirs from there"
And one would need to check different app stores, e.g. who was first in any of Google Play and Apple's App Store?