How to program modules on assembled PCBs?
They either have programming points, which are basically just a small round point on the PCB, on which they push the pogo pins down and program it. pogo pins are like your normal header, but they have springs in them, which means you can press them down and they move with it.

Another way would be that they have a test rig on which they press the assembled PCB down. They use again the pogo pins, but instead of touching some points on the PCB, they touch the solder points (around the HC-05) and then program it. 


But that may dont work always, like with the half holes from the HC-05. Then you would use these hooks.



You just slide the populated PCB in it and the hooks hold the PCB in place. But those may wear out after some time.

They can also pre-program the chips with test sockets. They place the bare IC in a socket, close it up and can program it with the broken out pins.  Here's a picture of it: 



but that is rather bad for manufacturing when you do the programming by hand, because when you program it before its soldered, you need to take it out of the reel and put it back in, instead of holding a little board for a few seconds and then ship the board.