Importance of baud rate in USB CDC
The ATmega16U2 used in the Arduino Uno is acting as a USB to serial converter, connected to the ATmega328P that you're programming. Setting the baud rate on the USB CDC serial device causes the ATmega16U2 to set its UART to that baud rate, so setting an incorrect baud rate prevents proper communications between the two chips.

If you were using an Arduino based on an ATmega32U4 -- such as the Arduino Leonardo or Arduino Micro -- the USB CDC baud rate would not matter, as the AVR interprets "serial" data directly from the USB stream. (Indeed, you can send data in either direction however fast you want; the baud rate has no effect on transfer rates.)