I am particularly interested in the difference between the Arduino UNO which uses an additional microcontroller (ATMega16U2) for USB conversion and Arduino Leonardo which does not have some middle layer controller.
The ATMega16U is really an odd microcontroller. Although it has a USB PHY on chip, it still comes with only:
- 16 KB of program memory
- 512 B of RAM (! that's bytes, not kilobytes)
- 32 pads
Whereas the ATMEga32U4 used in the Arduino Leonardo (isn't great, but) has:
- 32 KB of program memory
- 2.5 kB of RAM
- 44 pads
So, the reasons to not do it on the Atmega16U itself are:
- little program memory (as the USB interface/USB bootloader simply takes up serious amounts of the only 16 kB you have)
- little fun in doing so: if all you have are 512 B of RAM, you can't implement much stack – so calling functions from handlers from handlers gets problematic quickly; you can't keep anything of your bootloader in RAM when you hand over to the application if your RAM is that rare
- Problematic GPIO situation: with much fewer pads, it's harder to select a sensible set of IO pins if you can't assign the USB functions to just any pins (that's not a concern in this case, both the ATMega16U and ATMega32U have fixed USB pins, you can't select to which pins USB should be routed)
So, I think the strongest argument is probably really that implementing USB on the ATMega16U is hard and problematic, since the resources of that IC are so severely limited.
Personal note: I never understood why Arduino went for the 8 bit microcontrollers in an era when there was mature 32 bit microcontrollers with much richer resources available, and where they were in a position to hide the complexity of these from their users, anyway. We shall never know – maybe they had a deal with Microchip, because for me as low-volume buyer, these Atmega328 (1.90€), Atmega16U2 (2.30€) and Atmega32U4 (3.70€) are way more expensive than a capable ARM Cortex-M running at multiples of these device's clock rate, having upwards of 32 kB program memory and typically several kB of RAM.