There are several parts to this, many of which will depend on how you’ve set up your product.
Particle does not provide a programming service for devices in our factory. Presumably you have some sort of contract manufacturer who is assembling your product, so they may be able to program it. Some product creators also do the code flash and testing themselves.
In a factory setting, many manufacturers will just accept the binary files for the bootloader, as well as system part 1, system part 2, system part 3, and user firmware. To reduce the number of steps they have to do, you can combine all but the bootloader into a single concatenated binary. Then they’ll flash the device using SWD/JTAG in two steps.
Another common alternative is to flash all of the necessary files using USB and the Particle CLI. This can be done from Windows, Linux, or Mac, so it’s relatively straightforward. Using a script to automate the process makes things even easier.
It’s technically possible to provide a factory new device to a customer and once the SIM is activated, it will self-upgrade the device OS and the user firmware binaries, but this uses a lot of data, increases the setup time, and makes it difficult to test the device, so we don’t really recommend doing that.