PSoC Creator generates a set of elf & hex files for CM0p and afterwards for CM4. After both set of files are generated, they are merged into the hex file of CM4.
That is why you see that the hex file for CM4 contains information for both cores. This hex file is the one that should be used to program the PSoC device.
When we are debugging with Creator, we have to chose one of core in Creator.
When we chose CM0p, is the hex file of only CM0P used? That is, is the only CM0p code downloaded?
When we chose CM4, is the both CM0p and CM4 code downloaded?
When you program or debug the PSoC 6 MCU, the device is programmed with code for both cores (The merged hex file is used). The core selection only matters for debugging.