At its height Ta Prohm was a center for learning and healing. Temple officials there administrated 102 hospitals spread throughout the country, each staffed with doctors who could treat fevers and injuries. The hospitals were well supplied with herbal remedies for fevers and injuries - one record specifically mentions 1,960 boxes of hemorrhoid cream. There was treasure too. The foundation stele from Ta Prohm states that at the temple's consecration in 1186 CE, it held gold and silver vessels, 35 diamonds, 40,620 pearls, 4,540 precious stones, 512 silk beds, nearly 900 Chinese veils, and over 500 sunshades to protect the high officials' skins. When you look at the ruins today, it's difficult to imagine that at one time, nearly thirteen thousand priests, officials, assistants and dancers lived within the temple, and nearly eighty thousand locals supported it with goods.
Jayavarman must have thought this monastery would stand for centuries, but it was defiled after only fifty years. Jayavarman VIII, the great builder's grandson, was a Shivaite fanatic bent on destroying Buddhist influence in his inherited Empire. The new king removed or altered any Buddha images he could find. At Ta Prohm, his men gouged the Buddha out of every niche, leaving behind concave gaps filled with rough chisel marks. Some dig so deep into the stone walls that you can see sunlight shining between the blocks. After the destruction, Jayavarman VIII reconsecrated the temples to Hinduism. By and large, he proved an unremarkable king. He built no temples of his own, and reigned for 52 years before his Buddhist stepson removed him in a palace coup.
By this time, the Khmer Empire was starting to decay. Theories about the decline vary - some suggest that the city's canals broke down, others that shifting trade patterns made the site less advantageous - but without doubt the death knell was when the Siamese Kingdom of Ayutthaya besieged and sacked Angkor in 1431. The victorious Siamese stripped the temples and carried away anything they could - indeed, you can still see some of the spoils in present-day Thailand. Angkor never fully recovered from the blow, and the Khmer Empire moved its capitol south to present-day Phnom Penh, a site better suited for trade along the Mekong.
The jungle moved in and took over Ta Prohm and its sister temples, but the area was not forgotten. The temples, and Angkor Wat in particular, were famous in Southeast Asia, and Buddhist pilgrims continued to visit. While many fell into disrepair, Angkor Wat for the most part remained well maintained.
Portuguese traders and missionaries first saw the temples in the 16th century, and started circulating stories about a great stone city nestled in the jungle. Angkor's scale and beauty impressed Europeans so much that they attributed the temples to Alexander the Great or the Roman Emperor Trajan, making the racist assumption that the local population would be unable to build such a wonder. (As noted in this excellent episode of The Big Picture, this was common thinking at the time.) After Cambodia became a French colony in the 19th century, the French School of the Far East decided that the Angkor region warranted further study, and sent several expeditions to document and restore the temples.
Or rather, restore every temple except Ta Prohm.
When the French arrived at Angkor, many of the smaller temples were beginning to merge with nature, and it appealed to the team's sense of the aesthetic. Not only did the crumbling structure dovetail with the "lost world" narratives gaining steam at the time - King Solomon's Mines published in 1885, four years before the first expedition - but ruined ancient, overgrown monuments were a common theme in Romantic paintings. Therefore while the team cleared the brush and trees out of the rest of the complex, the team left Ta Prohm in its "natural state" as a curiosity. In other words, the reason Ta Prohm looks like the perfect lost temple in Tomb Raider is because the French designed it to look like a lost city - which in turn, further fueled the adventure fiction Tomb Raider drew inspiration from.
Sadly, the restoration halted in 1970. The rise of the Khmer Rouge and the ensuing Cambodian Civil War made the area too dangerous, and temples suffered collateral damage. The Khmer Rouge used them as bunkers - even Angkor Wat bears scars from a firefight - and Pol Pot ordered religious figures and structures destroyed in an attempt to remake Khmer culture. Ta Prohm did not escape. Khmer Rouge soldiers destroyed the temple's central linga, or Shiva phallic stone. When the Civil War ended in 1993, the international community mounted a joint effort to pick up the pieces in a country where war and genocide killed up to 20% of the population.