There is growing discontent against Jesus and the Pharisees came to test Jesus.
Religious Jews practiced ritual purification and even today following strict rulkes about food and meals. Then they decline to eat what comes from the market because of fears of impurity.
So the Pharisees and Scribes put this question to Jesus about why his disciples didnt follow these ritual purification laws and are now publically eating with unclean Gentiles. The Pharisees have given greater weight to their traditions than to God's law. Jesus now moves his attention from the Pharisees to the crowd, from specific argumentation to parables. Spiritual defilement is not caused by contamination from unwashed hands, or anything, even contact with a dead body, or bodily fluids, or foods. Jesus is not actually demolishing Leviticus 15, or the image of purity required of God's people as illustrated in the food laws but rather the idea that a person can, by the careful observance of rituals, make themselves holy. It's what comes from within that defiles us, The food that you put into your mouth doesn't make you unclean and unfit to worship God.
If any man has ears to hear, let him hear.
The apostles come to Jesus privately for an explanation of the riddle. In saying this, Jesus declared all foods clean.Purity is a matter of the heart and mind. Its
evil thoughts, greed, lust, lewdness, wantonness, indecency, envy, jealousy", foolishness, stupidity that make you impure.