So the Chinese diplomat Zhou Daguan relates that in the Khmer Empire,
“In times gone by, (...) collection of gall took place. The king of Champa annually exacted a large jar filled with thousands and thousands of human gall bladders. In dead of night men were stationed here and there in the more frequented parts of cities and villages. When they met people walking by night they threw over their heads a hood gathered together by a cord and with a small knife removed the gall bladder low down on the right side. (...) Only recently this practice of gathering gall was abandoned (...).”
Why did this practice take place? Why did Champa demand human gallbladders from the Khmer Empire?
We don't know anything else about this specific batch of gallbladders and probably never will.
There are other mentions of human gallbladder use in Champa and the Khmer Empire from the 16th century onwards in Chinese and Spanish sources. From these we can infer that human gallbladders featured in the region’s stories and were believed to have certain properties.
However, we can’t cross reference these mentions (including the one by Zhou Daguan) against local records to determine their accuracy. Southeast Asia’s climate is very unforgiving to perishable media. We know the Cham and Khmer Empire kept records on palm leaves but not a single one survives. Or, if they have, we haven’t found them.
Thus, in this answer, I’ll list some sources that mention human gallbladder usage in Champa and Cambodia, take a look at the significance of the gallbladder in these cultures, and from there perhaps we can make some (speculative and vague) guesses about what they might have been used for.
Let's start with the quote in question. Zhou Daguan describes the number of gallbladders as 万千余枚. While this could mean thousands upon thousands, its more accurate meaning is "lots and lots" of something. So if this incident actually happened, we don't know whether it really resulted in the massacre of thousands of people (to paraphrase the meme, when it comes to human gallbladders, even 3 is quite a lot).
As OP points out, he later says
近年已除取胆之事
In recent years, the practice of collecting gallbladders has been abolished
So this is not something that he witnessed for himself, it was not even something that happened the year before he got there.
At the time of Zhou Daguan’s writing, the last time the Cham were in a position to demand tribute was 1177, when the Cham had managed to occupy Angkor, capital of the Khmer Empire. Zhou Daguan was in Angkor in 1296 so there was plenty of time between the two events for stories to be told, exaggerated and believed.We should also note that at this time, the Khmer Empire had converted to Buddhism, while Champa was still Hindu. Could such stories be a way of denigrating their neighbours? Was this the Khmer equivalent of, watch out for those guys or you might end up in an icy bathtub with your kidneys gone? Zhou also mentions that Chinese gallbladders are off limits, because in one year a Chinese gallbladder ended up in the jar and spoiled the entire collection, which doesn't sound entirely factual.
I’m not saying that the story is definitely false, it could well be true, but we have no way of knowing how true it is.
Having said that, there definitely seems to have been something up with human gallbladders in Champa and the Khmer Empire, given their mention in sources from the 16th century.
Our first source is the records of the Ming treasure voyages which visited Champa several times. Ma Huan, a translator on board 3 expeditions, wrote about his expedition in the 瀛涯胜览 (Yingya Shenglan), the final draft of which was completed around 1451.
其王年节日,用生人胆汁调水沐浴,其各处头目采取进纳,以为贡献之礼。
The king (of Champa) used human bile in his bathwater. This was presented as tribute by the various chieftains.
Fei Xin, a soldier on board 4 expeditions, also wrote about his experiences in the 星槎胜览 (Xingcha Shenglan) around 1436:
岁时纵人采生人胆鬻官,其酋长或部领得胆如酒中,与家人同饮,谓之曰通身是胆。
At certain times of the year, human gallbladders are harvested to sell to officials. When chieftains and leaders receive these gallbladders, they place them in wine and drink with their families. This is known as ‘imbuing the body with courage’.
The last character, 胆 (dan), means courage but is also the word used for gallbladder. As an interesting aside, in Chinese traditional medicine the gallbladder is said to regulate judgement and give one courage, and something similar may have been believed in Champa and the Khmer Empire. In fact, a wide variety of animal biles has been prescribed for all manner of illnesses in traditional Chinese medicine since the Zhou Dynasty.
Human gallbladder consumption in Champa is also mentioned in the Spanish Boxer Codex of 1590 (disclaimer: I don’t have access to a translation in its entirety right now):
The king and his wives - often more than a hundred - would deliver an express order to their subjects: until they managed to fill two gold basins with human galls (which must be from people of their own nation and not foreigners) and present them to the king, they should not return. These citizens followed the order and fetched galls from all the women and adults they encountered on the road. They would tie the victims to tree trunks and cut out their galls, and in its place, they smear the wound with a little local herb.
None of these accounts list their sources, so this isn’t proof that Chams were being mugged so that royalty could drink and bathe in their bile. We now believe that, contrary to Chinese reports, Champa was actually a collection of polities and not one united kingdom. So did all kings do it? Did one king do it? Did no kings do it? Was there one king who did it just that once? It’s all impossible to say.
However, given that they were mentioned by more than one source from more than one country, we can say that stories about human gallbladders were likely told and believed by the local population, and that the organ was in some way significant in their culture.
(Continued in reply)