Register writing by compound assignment and pointer in Arduino due
Why compound assignment works on write-only registers ?

Probably out of force of habit more than anything.  People are used to having to set bits in registers where the other bits can be read and they want them to stay the same, in which case |= makes sense.
I'd considered that |= might be generating a more efficient instruction, but at least with your REG_PMC_PCER1 |= PMC_PCER1_PID36 example objdump indicates that this is not the case.

Where are those constants (PMC_PCER1_PID36,PMC,etc.) defined ?

Code-wise, they're defined in the ATMEL's (now Microchip's) CMSIS files.  These are header files whose existence is somewhat standardized by ARM for these ARM Cortex processors.  Much of their content isn't however.  E.g., you may see a few things related Cortex M3 that are the same between this ATMEL device in an STM32 counterpart, but GPIO registers may be completely different.
My broadly, they're defined by ATMEL in their datasheets.