Because when the Military needs to move stuff like with aircraft like that, they typically contract it from a commercial carrier.
They don't really have a big need for a 747-type Aircraft. At least not one that is modified for military use - civil versions... Well, it's cheaper to just hire it when you need it.
The Military will hire a carrier to bring in the pallets, and then they'll typically load them into a C-17 or a C-130 for a trip to a airfield closer to the front.
747 cargo versions can haul a lot of stuff.
747: 180,000 lbs
C-130J: 42,000 lbs
C-130H: 36,000 lbs
C-5: 261,000 lbs
C-17 170,000 lbs
The key difference here is that a C-17, while nominally very similar in load to a Cargo 747, only has 18 pallet positions. A Cargo 747 can carry twice that. So when it's paletized goods, that don't need to be dropped to their final destination, 747's make a lot of sense. But for the Military, they want that airlifter to be able to deliver the goods to a relatively rough field close to the front lines. Or they want to drop those goods. That's where a C-130 or a C-17 really shines.