Are flags strictly related to interrupts or not?
They are not strictly mapped to interrupts. Usually a peripheral (let's say an UART), has some flags like transmit complete, receive complete etc.

In the ARM world a peripheral can have one or two (or many vectors). For example the Kinetis has a single vector for UART (no matter if it is RX/TX, the ISR has to check the flags to find out why the interrupt happened), but dual vectors for CAN (MSCAN - separate TX and RX vectors), so the mapping varies from part to part.

Flags can also be used for triggering DMA without any sort of interrupts or for triggering event systems (like the "peripheral reflex system" in EFM32 or "event system" in XMEGA). For example on the EFM32 you can use the LESENSE peripheral to control the ADC and DAC, when some threshold is reached the "reflex" is fired, which tells a timer to count a pulse.