Generating clock signal with Timer1 and output compare register

I just started using Timer1 to generate clock signals, 1KHz, using the output compare register and OCR1A driven pin for the output. I realized that you have to set the pin to OUTPUT first or it would not output anything. Code snippet:

  digitalWrite(8, LOW);
  pinMode(8, OUTPUT);
  TCCR1B = _BV(WGM12)|_BV(CS10);   //              // CTC mode - 1 prescale
  TCCR1A = _BV(COM1A0);   //  or use TCCR1A = 0x40;            // Toggle mode 0C1A  
  OCR1A = 16000;     // set the counter 8000 for 1KHz square wave or 16000 for 500Hz

I'm using 1284P with Bobuino definition so the output pin maps to digital 8.

Is there any reason why I have to set to OUTPUT? Maybe there are registers I didn't set but pinMode() did it for me?

I am using this clock signal to synchronize a few modules, including the generator of the module itself. So the module needs to read in the clock and act when it senses a transition. So I just used digitalRead(8). Lo and behold, it works! I thought that when Timer1 takes over the output on the pin, the GPIO is disconnected. I guess not. According to the diagram in the spec sheet, the digital (and analog) input is always connected to the pin. Am I correct?

Thanks.

The general I/O port function is overridden by the Output Compare (OCnx) from the Waveform
Generator if either of the COMnx1:0 bits are set. However, the OCnx pin direction (input or out-
put) is still controlled by the Data Direction Register (DDR) for the port pin. The Data Direction
Register bit for the OCnx pin (DDR_OCnx) must be set as output before the OCnx value is visi-
ble on the pin. The port override function is generally independent of the Waveform Generation
mode, but there are some exceptions. Refer to Table 14-2, Table 14-3 and Table 14-4 for
details.

per datasheet.

Thanks DrAzzy. So DDR does need to be set to output. Wish I had some time to read the whole doc.