|Information in this article is non-canon|
It has been decided by the Council that no Sharptooth may eat any form of meat in the Great Valley, for our own protection of course, no Sharptooth is to eat green food within the Great Valley, not that they would, but after what they did to us all these cold times, even if they wanted to, they no longer can, and no Sharptooth is to travel further than where the Great Valley is in sight. Any Sharpteeth breaking this rule will be expelled from the Great Valley...permanently.
The Sharptooth Code was passed, presumably to protect the Great Valley from the new loophole Littlefoot had created by getting the Council to alllow Chomper and any other Friendly Sharptooth to stay as a permanent resident. Deino, who had a dislike of Sharpteeth, passed the code to punish Sharpteeth for their past wrongs and to keep the Great Valley safe from them.
In reality, Deino is actually the infamous villain Fanged Flattooth, and this is a covert attempt to get the Friendly Sharpteeth, all friends with Littlefoot, to, in their hunger, turn against Littlefoot and slay him.
The plan goes south when Chomper finds out Deino's identity, forcing Deino to kill the Old One and frame Chomper for it to silence him. After Deino's death at the hands of Littlefoot, the Sharptooth Code was repealed in its entirety and was remembered by Great Valley residents in the future as an injustice of Great Valley history. The Sharptooth Code is a sort of paraody, in a way, of Jim Crow Laws.