How were the Old Testament laws divided into moral and dietary laws? I heard it was a Christian tradition.
Any division of the laws into groupings would be based entirely on the thoughts of the one making such divisions. The most common division is between the “ceremonial law” and the “moral law.” I think that division is probably made by non-Jewish Christians who think that they are bound by part of the Law of Moses but not all of it. They would make the sacrifices part of the law that they no longer have to keep and the dietary laws, the Ten Commandments, and certain other laws as what should be kept.
The dietary laws are obvious, because they are about what can be eaten. They are primarily found in Leviticus 11. What some might call the moral laws would be anything that deals with our relationships with one another. These would include laws concerning killing, sexuality, and property ownership. That still leaves many laws unclassified, such as the laws about sacrifice, holy days, and idolatry.
Any such divisions are artificial and usually indicate a willingness to keep only that part of the Law that the one making the division wants to keep. Since Christians, and particularly non-Jewish Christians, are not bound by any part of the Law of Moses we really don’t need to worry about such distinctions. (See my article The Ten and Me for the scriptures backing up this last statement.)