That's because Gordon was a genius, and also a complete nutcase. He never slept, died a virgin, an obvious closet-case -- all in all, he was one of those 19th c. Brits you have to admire but can't help laughing at. Like most closet cases, he had a bad case of religion. When he wasn't slaughtering wogs he was going over the topography of Jerusalem trying to relocate Christ's tomb.
Before Gordon met the Mahdi, he made a name for himself in one of the biggest wars nobody ever heard of, the Taiping Rebellion in China. By the 19th century England was hip-deep in China on a civilizing mission, trying to turn the whole population into junkies hooked on the opium the Brits grew in huge plantations in India. British troops and fleets fought two "Opium Wars" to force the Manchu to allow them to deal dope all through China, and in the process weakened the Manchu's grip on the country to the point where all kinds of weird local warlords took power, the biggest being a Chinese nutcase, sort of a Christian-Asian Mahdi, who declared himself "Jesus's Chinese son," and ended up controlling a huge chunk of China -- until Gordon came along. The Brits wanted China wide open to dope-dealing, but when the Chinese Jesus's troops got close to the coastal cities, they decided enough was enough and sent Gordon to take him out. With nothing but a mixed Chinese/European mercenary force, a few jerry-rigged gunboats operating on the Chinese canal/river system and his own military genius, Gordon crushed the gigantic hordes this Chinese Jesus had ordered toward the coast. Gordon's genius was to use the canal system to concentrate firepower against the Taiping rebels' hugely superior numbers. He played a long, slow game of Pac-Man along the canal system, catching and wiping out the rebels' dispersed forces, until he'd cleaned up the board. It was such a feat of sheer genius that it stood out at a time when under-funded, outgunned British commanders routinely won against gigantic wog armies.
And it made Gordon a big media star with the London tabloids, known forever after as "Chinese" Gordon. He seemed like the perfect choice to handle the Sudanese situation, which was getting out of hand by the 1870s. And Gordon went on doing miracle after miracle, as expected. He dealt with a rebellion in Darfur by riding into the enemy camp, having a chat and riding home with everybody friends. Gordon was not only a genius and totally fearlessyou get the impression he also had a huge death wish, and rode home from these successful facedowns with tribal thugs muttering to himself in disappointment: "Damned Bedu wankers, all talk! Could've killed me a dozen times! What do I have to do, stick me 'ead in the Suez canal?"
The Sudanese Mahdi's Jihad didn't really get off the ground till the early 1880s. Gordon went south to deal with it in 1884. As usual, he was vastly outnumbered, with just a small force of mostly Egyptian troops. His official mission was to study the situation. But that would have been too easy. Idle hands! Those Victorians feared those idle wankin' hands way more than death.
So Gordon decided God wanted him to organize the defense of Khartoum against the Islamist scourge from the desert. This drove his bosses in London crazy, because they'd never authorized any such mission. Worse yet, they started to realize, as the tabloids published Gordon's dispatches from besieged Khartoum, that this uppity bastard was actually stage-managing his own martyrdom in the London press, all the way from the end of the world.
Gordon could send his stories because the British gunboats controlled the Nile. The Mahdi had no navy -- it takes a lot more organization and know-how to set up a navy than to get a bunch of goat herders together into something you can call an army. So even after the Mahdi's forces besieged Khartoum in the spring of 1884, Gordon's carefully worded stories of his heroic last stand were hitting the pavement in England, setting the mob howling for a relief expedition and causing fine beads of sweat to break out on the Foreign Office boys' fussy little moustaches.