When the microcontroller is brand-new, you need to flash both parts on it using special (although very inexpensive) hardware. After that, only new versions of the main firmware need to be flashed whenever you change your layers, macros, etc; And the special programming hardware is no longer needed, you can do it pretty easily and quickly with your keyboard plugged in as normal.