Matthew 15:25-26 (NKJV), “Then she (a Syrophoenician woman) came and worshiped him (Jesus), saying, ‘Lord, help me!’ But He answered and said, ‘It is not good to take the children’s bread and throw it to the little dogs.’”
The Syrophoenicians (Canaanites) opposed the worship of Jehovah in Old Testament times. Consider how evil Queen Jezebel promoted Baal worship and tried to kill Elijah. This group also practiced human infant sacrifice until Grecian times. The Jews and the Syrophoenicians were enemies.
However, Jesus would not speak those words today. Different messages are appropriate for different time periods. For example, it would be silly to proclaim the flood was coming.
During the period of Jesus’ earthly ministry, God’s special blessings were confined to the Jewish people. Jesus said, “I was not sent except to the lost sheep of the house of Israel.” (Matthew 15:24) Why? Because at his first advent, the 70 weeks of favor to Israel (Daniel 9:24) were still being fulfilled. Seventy (prophetic) weeks of years, 490 years, had been specifically set apart to favor the Jewish nation. (454 BC- 36 AD).
The end of the 70th week was the termination of God’s exclusive care for Israel. Thus, in 36 AD, the Gospel message was opened to the Gentiles, sent specifically to Cornelius the first Gentile convert. This was demonstrated when Cornelius was begotten of the holy Spirit.
Prior to 36 AD, the Gentiles had no relationship with God. So, in some sense, they were considered dogs (sinners without God’s favor). But today, the gospel call to become part of Christ’s bride is spread throughout the world. No person is considered to be a lower class than another. Every single person is equally a sinner, condemned to death. “Therefore, as through one man’s offense judgment came to all men, resulting in condemnation…” Romans 5:18. “There is no one righteous, not even one,” Romans 3:10.
During Jesus’ second advent, all mankind will be resurrected and come to know God. Isaiah 11:9, “They shall not hurt nor destroy in all My holy mountain, For the earth shall be full of the knowledge of the LORD as the waters cover the sea.” Then, God will make every man “more precious than fine gold; even a man than the golden wedge of Ophir.” Isaiah 13:12 (KJV). Only those who willfully refuse God’s favor will die the second death.
For more details, please see our answer to a similar question here.