Matt 15v2 talked about the tradition of the elders or we could say the tradition of man which is not of God.
If we look further down into Matthew 15v20 we see that Christ was not necessarily addressing the food that they were eating, He was talking about eating with unwashed hands. Unwashed hands is the tradition of man. I can’t remember seeing in the bible where it said we should was our hands before eating. So if you eat with unclean hands, any dirt on your hands just enter your mouth and passed through your system. So in this passage Christ was not talking about what we eat, He was addressing unclean hands.
I hope this helps