God Challenges the Faith of those He Loves

How can Jesus treat this woman this way? Oh that the Lord would do the same for us, he challenges our faith to teach and strengthen us, so that we will go to him and hold his word firmly.