Jesus knew about them what they were saying to each other. Therefore he told them this story to teach them.