scswift:
Why does this technique require the removal of the bootloader? Doesn't the bootloader run only once when the board is initially powered up, and from then on it's never executed again unless you press reset or the PC attempts to initiate a serial connection?(I assume the code that performs that check is part of your sketch, not the bootloader itself.)
As I mentioned, it is not strictly required but hell of a lot easier without the bootloader.
That's because the bootloader configures a lot of peripherals and clocks that might be unnecessary, and you would have to undo all these settings. It is easier to start with a microcontroller on the default configuration and just enable what's needed.
It is true that the bootloader runs only once, so if you configure everything at setup it should be fine.
The reason I initially removed the bootloader was different; some kind of weird bug caused my serial communication to delete the first few pages of my program, rendering it useless and stuck in bootloader mode. Something probably triggered the programming function of the bootloader, overwriting the instructions with zeroes. I chose the easy road of removing it all together!