I’m surprised that the build doesn’t fail on that. It could be that it falls back using a different profile with the same name (but a different ID) at compile time. Luckily the build log should tell you.
This too is all answered by the build log (might need to set it to Detailed or even Debug, not sure right now what level these messages are at). It should tell you in detail what profile it’s picking and why, and whether it matches your device id and bundle id. (and any mismatch should fail).
You can also always look at your .app to see what profile actually ended up inside it; the provisioning profile is binary but contains a large human-readable XML chunk in the middle, so opening it in a text editor like BBEdit lets you inspect it well, including checking if its the right bundle id, and if your device is listed.
That message in itself is usually a (badly phrased) indication that the app has no profile (unlikely) or that the profile does not contain your device. This is error code 0xe8008015.