When timer runs freely, if a channel is set as Output Compare, upon each Compare event - i.e. when TIM_CNT matches TIM_CCRx - the respective CCxIF flag in TIM_DIER is set.
This happens regardless of the setting of respective CCxE enable bit in TIM_CCER - this bit, for a channel set to Output Compare, only enables/disables generation of output signal.
So, if one would like to suppress generation of TIM_DIER.CCxIF for any reason, it would seem to be logical to set TIM_CCRx to a value never attainable by TIM_CNT, i.e. to any value larger than TIM_ARR.
Surprisingly, this does not stop TIM_DIER.CCxIF being generated. This is documented in the RM, at the description of TIM_DIER.CC1IF bit:
When the contents of TIMx_CCR1 are greater than the contents of TIMx_ARR, the CC1IF bit goes high on the counter overflow (in upcounting and up/down-counting modes) or underflow (in downcounting mode).nonetheless, this remark is easy to miss, and the behaviour is not expected.
Setting TIM_DIER.CCxIF results not only in interrupts when enabled, but also in DMA transfers if configured to be triggered by that channel. Also, if the channel in question is CH1, and TRGO is set by TIM_CR2.MMS=0b011 to CC1IF (quite incorrectly called by RM Compare Pulse, as it works perfectly also when CH1 is set to capture), TRGO pulses are generated thus can be used as TRGI in coupled timers, or triggers to ADCs when set so.
Note, that TIM channels are set to Output Compare by default, so these signals start to be generated as soon as the timer is set to run freely and enabled. The only way to suppress them is to set given channel to Input Capture and not enable it in CCER.