So which should it be - 'lock and load' or 'load and lock'?
From Springfield Armory's manual for the M1 Garand rifle (as John Wayne used in "The Sands of Iwo Jima"):
Prepare the rifle for loading. Pull the operating rod handle to the rear until the bolt is securely locked open.
Loading a full clip. Grasp the rifle with your left hand just forward of and under the receiver. Place the butt of the rifle on or against something fairly solid such as your thigh, a table or the ground. Using your right hand place the clip on the top center of the cartridge with your hand extended down the right side of the rifle so that your hand is just forward of the operating rod handle. Push the clip down until it latches. The operating handle and bolt should stay to the rear as long as downward pressure is maintained on the top cartridge.
The reason for the order of 'to lock and load' has been almost entirely forgotten in contemporary use. The phrase is a relic from the period when guns used loose gunpowder, popularized in its imperative form since sometime before 1940.
lock, n.2
In a gun or firearm which uses loose gunpowder: a mechanism by means of which the charge is exploded. Now chiefly hist.OED
In the case of flintlocks, for example, the lock struck flint; in the case of percussion locks, which succeeded flintlocks, the lock struck a percussion cap (a development enabled by the discovery and use of mercury fulminate). Other examples include the matchlock (a slow, smoldering match ignited the charge), the wheel-lock, the firelock, etc.
Examples of historical use of 'to lock and load' pre-1940 are comparatively rare, but make clear that the essential meaning is "to prepare to fire". For example, this from the 1836 Lord Roldan:
"O! it can be read by ordinary light," said Davie, snatching a pistol from his pocket, and cocking it at the same moment; "There is my commission, steel mounted, inlaid with gold, locked and loaded....
Similarly, this next, dated 1793 from the 1894 publication of the Collections of the New Brunswick Historical Society:
...that afterwards Carvell brought in two musquets and justice Hubbard asked him if the guns were well locked and loaded.
An 1883 publication of an 1867 patent in Patents for Inventions makes the sense particularly clear:
...the gun is locked and loaded by the muzzle; the gun is then unlocked and a percussion cap put on the nipple of the apparatus; the gun is relocked and it is ready for firing.
The OED has an entry for "Lock and load," and its earliest attested use is from 1940, but in an article in The New York Times.
Lieut. Col. Joseph T. Hart, range officer, boomed through his microphone, ‘Lock and Load’.
- 1940 - N.Y. Times 19 Nov. 12/3
The definition provided in the OED is broken into literal and figurative meanings:
(a) to prepare a firearm for firing by pulling back and ‘locking’ the bolt and loading the ammunition (frequently in imperative, as an order); (b) fig. to ready oneself for action or confrontation.
I don't personally know much about firearms, but doing some research seemed to confirm the question's assertion that "loading" ought to come prior to "locking."
From the Wikipedia page on "Bolt action" firearms:
As the handle is operated, the bolt is unlocked and pulled back opening the breech, the spent cartridge case is extracted and ejected, the firing pin within the bolt is cocked (either on opening or closing of the bolt depending on the gun design) and engages the sear, then upon the bolt being pushed back a new cartridge (if available) is loaded into the chamber, and finally the breech is closed tight by the bolt locking against the receiver.
Unless someone with more expertise in firearms can explain an alternative meaning of "locking" that would occur prior to the loading of the weapon, I would posit that the phrase caught on in popularity simply because it rolls well off the tongue, often spoken and sometimes even written as "Lock N' Load," which was also the name of a 1990 film.
For what it's worth, searching newspapers.com found some earlier uses of the phrase locked and loaded that refer not to guns but to shipments or vehicles. Notably, a car or truck would need to be loaded before it was locked as well. In both cases, it appears that the writers or speakers are ignoring chronology in favor of style when they use the words "locked and loaded" or "lock and load."