The bible contains a lot of things that are considered sinful or a sodomy. Like shaving your beard.
The subchapter is called The Prohibition of Foreign Rites.
It is referring to pagan tribes that were living in the levant at that time. Those had a special kind of shaving their hair and their beard.
Leviticus 19:26-27:
Do not eat any meat with the blood still in it.
Do not practice divination or seek omens.
Do not cut the hair at the sides of your head or clip off the edges of your beard.
After being asked if the converted heathens should adapt to the Jewish practices Peter says in the New Testament (Acts 15:10-11):
Now then, why do you try to test God by putting on the necks of Gentiles a yoke that neither we nor our ancestors have been able to bear? No! We believe it is through the grace of our Lord Jesus that we are saved, just as they are.