How are PCB's programmed?
why not? 

Well ok ... they might not connect a USB to each one as there are faster ways - flyingProbe/PogoPins on a "bed of nails"

http://en.wikipedia.org/wiki/In-circuit_test



This type of temporary connection speeds up testing &amp; pre-programming considerably. 

Each card that is made has to go through some form of test process at the end (flying probe or manual). 

https://learn.sparkfun.com/tutorials/electronics-assembly


  On boards that require programming or calibration, additional steps
  are taken to load code and verify the output.