writing on external interrupt pin
In most chips, you can trigger an interrupt from software. Here's an excerpt from the ATMega328 datasheet:


  Observe that, if
  enabled, the interrupts will trigger even if the INT0 and INT1 or PCINT23...0 pins are configured as outputs. This
  feature provides a way of generating a software interrupt.


So if you will change the value of the bit corresponding to your interrupt pin in PORTx register, it will trigger an interrupt. You can, of course, set when the interrupt will trigger - on change, rising or falling.

I recommend reading your chip's datasheet as well to see what the manufacturer says about this.

If you want to avoid this situation altogether, you can use a different PORTx register for outputs if you need to utilize all 8 pins in PORTB, or just leave the interrupt bit alone and not change its values.