user14022: I was driving a relay from Arduino Uno R3 Pin 13. I observed that every time I upload some code the led on the board designating pin 13 would blink. I'm curious why this is so. I understand that the serial LED blinks cause there's a serial transmission but why an IO pin?

user7856: It's driven by the bootloader, which is performing the flashing (I suppose you are flashing through the USB port).

user10794: See What happens when code is uploaded using the bootloader? - the flashing is by design.

Probably the reason is to confirm that the bootloader has started.

14022: <p>I was driving a relay from Arduino Uno R3 Pin 13. I observed that every time I upload some code the led on the board designating pin 13 would blink. I'm curious why this is so. I understand that the serial LED blinks cause there's a serial transmission but why an IO pin?</p>
 7856: <p>It's driven by the bootloader, which is performing the flashing (I suppose you are flashing through the USB port).</p>
 10794: <p>See <a href="https://arduino.stackexchange.com/questions/15936/what-happens-when-code-is-uploaded-using-the-bootloader">What happens when code is uploaded using the bootloader?</a> - the flashing is by design.</p>

<p><a href="https://i.stack.imgur.com/vrReL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vrReL.png" alt="Optiboot flashing pin 13"></a></p>

<p>Probably the reason is to confirm that the bootloader has started.</p>
