It takes a lot to distinguish yourself if you are the fourteenth king named Louis. Louis XIV managed to do this in several ways: becoming one of the most powerful French monarchs and helping to bring surgery on the anus (and elsewhere) into the modern ages.
Louis XIV had a number of illnesses, with recurring boils, gout, headaches, and symptoms similar to diabetes. It probably didn't help that he wasn't too hot on hygiene, and (reportedly) only bathed twice in his lifetime. While that is likely an exaggeration – he may have bathed a whole twice a year – it's true that a Russian emissary to his court wrote that he “stunk like a wild animal”.
The illness which would help improve surgery (but not his smell) was first discovered in January 1685, when Royal physicians found a swelling on the King's royal anus. Over the next month, this developed into an abscess, then a fistula (an abnormal connection between two body parts, e.g. a horseshoe fistula which connects the anus to the surface of the skin on either side of the anus).
The king was first treated with enemas, lotions, poking it with a red hot poker, and – as was traditional – bloodletting. None of the treatments were successful, and the king continued to be in immense pain, unable to sit down on the royal ass. He also began to leak pus, and had to change clothes regularly as a result.
Enter Charles-François Félix, a surgeon and barber (those professions were surprisingly linked in previous centuries) who was about to take on the daunting task of operating on a king, long before good hygiene and anesthetics.
Before he took on the job, he would need practice on anuses attached to non-royalty. Over months, he perfected the operation, practicing on around 75 healthy men from prisons and the countryside. It is not known how many of the test subjects died during those operations (despite attempts to find out), though given the lack of surgical hygiene and infection control at the time, it's definitely a question of "how many died" rather than whether any died at all. Rumor has it that the men who died were buried at sunrise and without the ringing of the church bells, so that nobody knew what had happened.
The operations (and probable pile of bodies) helped Félix develop the instruments he needed for the procedure, including one he named "le bistouri royal" or "the royal probe", a long and intimidating silver probe.
The operation went smoothly for both king and surgeon. Though uncomfortable – the king was laid down facing the window, while two apothecaries spread his legs apart – and undoubtedly painful, the three-hour operation ended his symptoms for a time, before two repeat operations were carried out later in his life.
"Is it over, gentlemen? Finish," he is supposed to have said towards the end of his surgery. "Do not treat me like a king, I want to recover as though I were a peasant."
The consequences of the surgery reached far beyond the king's anus. For a time, it became fashionable among courtiers to attempt to have the surgery (whether they needed it or not). More importantly, surgery got a better reputation. At the time, surgeons were held in lower regard than physicians (who had, let's remind ourselves, tried to cure a king's butt fistula by taking away his blood).
Following the operation, people from around Europe traveled to France for their surgery skills, and with Louis' support – including funding a college for the training of surgeons, where they could practice on cadavers – it flourished.
And that's how a king's anus led to the advancement of surgery in 17th century France.