Jesus initially ignored her because He was sent only to the lost sheep of Israel.
Watch the Teaching: Why Did Jesus Refuse to Help the Gentiles?