The rules given in Leviticus were designed to keep Israel separate from the rest of the world. While they were slaves in Egypt, the Israelites were forced to live together in one place. They were shut out of life in Egypt, but this protected them from the influence of Egyptian culture. Once they moved into the Promised Land, this protection was gone. The risk of losing their identity was enormous. They needed a way to protect themselves from the influence of the surrounding nations.
The book of Leviticus contained a set of rules and regulations that would give Israel a unique identity. This would keep them distinct from the nations round them. Leviticus is all about separation and holiness.
Being holy is about being different. The children of Israel would dress differently and eat differently. Their society would be organised differently. These distinct cultural patterns would keep them separated from other cultures that might influence them.
This is why many of the rules in Leviticus are about external behaviour. The best way to establish a distinct cultural identity is to live and behave differently from those around you. This is stated throughout the book.
You are to be holy to me because I, the LORD, am holy, and I have set you apart from the nations to be my own (Lev 20:26).
You must keep the Israelites separate from things that make them unclean, so they will not die in their uncleanness for defiling my dwelling place, which is among them (Lev 15:31).By dressing differently and eating different food, they were able to remain distinct.