Most of the people fell or jumped off as the aircraft started rolling on the taxiway. On the C-17 Globemaster, there is nothing really to hold on to, and the sound of its four jet engines is ear shattering without sufficient ear protectors . A few desperate men however tried to hitch a ride on the outside of the aircraft, perched on the open nose and main landing gear bay doors (as seen in the photo below).

As the plane took off and the doors closed, they all fell to their deaths. One or two persons managed to climb inside the gear bays but were crushed to death by the massive, retracting undercarriage.
Even if they had managed to somehow find some space to curl up between the wheels, the excruciatingly cold temperature and low air density at cruising altitude (significantly higher than the summit of Mt Everest) would have been fatal in a very short time.
I am not sure whether these people believed that the landing gears would remain extended for the entire flight or if they deliberately took a gamble between an almost certain and gruesome death or being caught by the Taliban, but it is heart-wrenching in any case.
The fuzzy photo below was taken by one of the desperate young men perching on the gear bay door just as the aircraft taxied out to the runway to take off.

Disclaimer: I am just explaining the scenario. Please show respect for the deceased people by avoiding commenting on their possible personal issues or politics.
Yusuf Bhandarkar CEO Founder Mumbai Multimedia Studio Mumbai-400008