How could an educated citizen of the 21st century ever reach the conclusion that a saber-toothed cat or Tyrannosaurus rex preferred eating fruit over flesh? Young-Earth Creationists (or YECs) seem to think so, and not based on compelling evidence from biology.
They do so in order to preserve a particular view of God's character: only an evil god would have created animals to kill each other. The Bible says the Creator looked back at his handiwork with the refrain "and it was good;" therefore, say the YECs, there's no room for death. It isn't "good" when living things die or kill, and the fact that they now do is actually our fault: "you must not eat from the tree of the knowledge of good and evil, for when you eat from it you will certainly die."
Until this commandment was broken, the entirety of life prior to humanity's most famous sin (which in fairness isn't very long according to the Young Earthers) apparently existed without death.
The idea that T. rex ate melons is the low-hanging "fruit" that makes it easy to laugh at a young-Earth creationist viewpoint. But behind this absurd claim is a much more serious argument, one used not only by YECs but also many atheists: a natural, evolutionary process that depends on differential survival -- i.e., death -- is fundamentally incompatible with the "good" Judeo-Christian God.
Anyone who subscribes to this God has to account for the fact that living things on this planet die a lot, some in rather unpleasant ways. So if you're Christian, and accept the evidence for evolution, you might wonder if the God of Abraham really planned it this way, or would it be more rational to argue that the ubiquity of death means that He doesn't actually exist? Here, I want to firstly acknowledge that this is a serious problem for anyone who claims to be in the fold of mainstream religion. Secondly, among three major contenders in this argument (YECs, atheists, and mainstream Christians -- not an exhaustive list), I think the mainstream is right.
The YECs say that the "good" creation of Genesis necessarily excludes death, and that a good world is fundamentally incompatible with evolution as a biologically creative process. Ignoring for a moment the massive factual problems of a geologically young Earth, and ample evidence demonstrating that biological evolution actually happened (as - spelled - out - by - a - lot - of - books), the YEC argument glosses over the fact that adults aren't usually studded with cancerous tumors, and when born our fingers (among other appendages) aren't typically webbed.
While you're reading this, cells in your body are dying (or undergoing apoptosis) in all the right places, so that your tissues can be replaced and you can keep living. It's harder than you might think to draw a biological line between death at the cell level and some kind of large-scale "death" that's more obviously unpleasant.
Biblical "death" is of course more than a biological phenomenon, but YECs view it as encompassing both acts of evil as well as natural death, in essence placing Khmer Rouge genocide in the same category as the feeding habits of wasp larvae. But this is a mistake; in so doing, they fail to recognize that life actually needs death for lots of uncontroversial biological processes (like development or tissue repair) besides evolution.
Atheists (or at least the subset thereof eager to debunk "god") offer another approach to explain death (and more broadly, "evil"): its ubiquity probably means that no god with a sense of compassion exists. This is what David Hume famously said in the 18th century (repeating a Greek idea summed up by the early Christian Lactantius in about 300AD):
"if He is neither willing nor able [to abolish evil], He is both envious and feeble, and therefore not God; if He is both willing and able, which alone is suitable to God, from what source then are evils?"
Rather than greatly distort the facts of nature in order to preserve any particular view of god, David Hume ditched the latter, concluding that religious scriptures have been entirely fabricated by human beings. Hume died in 1776, decades before Charles Darwin was born, and neither Hume nor the Greeks needed an appreciation of modern biological evolution to see the apparent contradiction of a loving God behind nature.
Mainstream Christians often use theodicy to reconcile the belief in a loving God with the presence of evil. How can a Good God tolerate Terrible things? One explanation that's been around for a couple millennia derives from the existence of free will: rational beings enable "evil" by virtue of our ability to make choices. A moral act can only be moral if the agent who did it had a choice in the matter. This implies that evil helps us to recognize good, just as by the existence of darkness we recognize light. Moreover, neither "evil" nor "good" are intrinsic attributes of objects or events, but need rational judgement to be recognized (or perpetrated). For this reason we do not condemn a toddler who shoots his playmate because such recognition develops; it derives from the capacity to reason, which a given agent may or may not have. A wasp larva without reason is not "evil" because it feeds on a living caterpillar, nor did an earthquake "murder" the inhabitants of Lisbon in 1755.
Of these three perspectives (YEC, atheist, and Christian), the YEC view is most at odds with the facts of biology and Earth history (see books linked above, among others). Humanity is a geologically recent species, and despite our awful impact today, we've obviously not been the cause of death prior to our existence. So what would lead someone to prefer mainstream Christian thinking over Hume's "no god" argument? Speaking for myself, this is not an easy choice. My hesitation comes primarily from the fact that while an earthquake cannot be "evil", the suffering left behind in its wake is no less unpleasant. Why would the Judeo-Christian God create a world like this? One explanation is to carefully consider the difference between evil and suffering; the former may often be the cause of the latter, but the two are not synonymous. The suffering of a concentration camp victim entails evil, or the deliberate choice of a rational agent. The suffering of a dying caterpillar at the hands (or mouthparts) of ichneumonid larvae does not. Moreover, and as argued by Lactantius,
"[God] does not take [evil] away, because He at the same time gives wisdom ... and there is more of goodness and pleasure in wisdom than of annoyance in evils."
A lot of thoughtful people out there are not entirely persuaded by this argument. Nonetheless, it entails difficult but helpful steps that enable us to recognize what life is without undue influence from what we think it ought to be. Like other questions in biology, the diet of T. rex is an empirical problem, not theological. With jaws and teeth like that, no, it did not eat melons.