What was the biological mechanism that allowed Tarrare to eat so much?
Tarrare

Tarrare was a showman who was renowned for his insatiable appetite including eating cats, dogs, and snakes sometimes raw.
He is also said to have eaten many inedible items.
At the time, he was alleged to have committed cannibalism of a 14-month-old baby and was caught in the act of cannibalising cadavers by hospital staff.

He was given away as a child by his parents and served in the French Revolutionary Army.

Tarrare died at the age of around 26. 
From the book "Anomalies and Curiosities of Medicine" originally published in 1896 by Gould and Pyle:


  He was of middle height and was always heated and sweating. He died of a purulent diarrhea, all his intestines and peritoneum being in a suppurating condition.


This record is 100 years after Tarreres death and is largely based on the 1819  London Medical and Physical Journal.
The earlier record claims:


  At seventeen years of age, Tarrare weighed only one hundred pounds,
  and was already able to eat, in twenty-four hours, a quarter of a
  bullock of that weight.


From these accounts, I form the opinion that Tarrare ate an incredibly poor diet of raw meat and offal and countless inedible objects.
There are references to throwing up after consuming raw animals and chronic diarrhoea. There are references to sleeping for large periods of time after eating large quantities of food.

Autopsy

A passage from the 1819 London Medical and Physical Journal:



This is the closest article we have to a contemporary record.
From this account we gather that his stomach was enlarged and ulcerated, his gall bladder was enlarged, and his liver was diseased and enlarged.
Also, it might be a factor that his appetite was lost during these final days, common among patients with diarrhoea.
The record at the time, as quoted above, attributes the cause of death to diarrhoea. 

Although the picture is painted that the autopsy occurred soon after death, we have no idea if this was hours, days, weeks, and conditions were much less sterile than modern morgues. I am not sure if the  "corruption" mentioned is significant. 
One source claims Tarrare died of TB, however, I cannot find any corroborating evidence.
Another source recounts Tarrare blaming his demise on eating a golden fork.

These post mortem observations could have developed from 20 years of eating an exceptionally poor, unhygienic, and often inedible diet and may or may not have been the cause of his underlying condition.

Summary

So we have a few things to consider.


Polyphagia including inedible object consumption
Died young 
Gastrointestinal abnormalities identified post mortum
Chronic fever and sweating
Chronic diarrhoea and vomiting
Periods of prolonged sleep


Polyphagia

The London Medical and Physical Journal describes Tarrare as having polyphagia which in his case could not be cured by acids, opium, or tobacco.

Colloquially, polyphagia means ingesting a wide variety of items.
However, if they meant "polyphagia" medically, it could be a symptom.

Polyphagia is a medical symptom defined as excessive hunger. 
In modern times, this can indicate a disorder such as diabetes (improper production or reception of insulin) or Kleine–Levin syndrome (a disorder of the hypothalamus).
It could also indicate a genetic condition Prader–Willi syndrome and Bardet–Biedl syndrome.

The full list of causes from Wikipedia is:


Anxiety
Stress
Depression
Orexigenic drugs
Diabetes mellitus
Hyperthyroidism
Hypoglycemia
Fatigue
Premenstrual syndrome
Prader–Willi syndrome 


From the
NHS:
Prader-Willi syndrome is a rare genetic condition that causes a wide range of physical symptoms, learning difficulties and behavioural 
problems.

Bulimia
Graves' disease


Autoimmune thyroid disorder that can lead to an intolerance of heat

Kleine–Levin syndrome


A sleep disorder



We cannot know if Tarrare's polyphagia was brought on by his stressful exhausting life, his poor diet, or some genetic condition.
We cannot even be sure if his condition was responsible directly or indirectly for his death.
We cannot know if his sweating was related to; his underlying condition, or a chronic state of infection.
The only cause for his eating we can rule out from the above list of underlying causes is premenstrual syndrome (PMS) and orexigenic drugs (which are not documented).
There could be a case made for most of the other causes. 

Concluding remarks

Given the scarceness of good quality medical records, the anecdotal nature of what was recorded, and the relatively poor diagnostic power of medical practitioners of the time, it would be, in my non-medical opinion, impossible to conclusively form a diagnosis.