The lesson here is that we “always ought to pray and not lose heart” (verse 1). The reason we keep praying is because we are confident that God hears our prayers and that they have an effect on Him.
Jesus tells a story about an unjust judge who finally grants the request of a poor widow. She begged and begged and He finally answered to get her off his back.
Likewise, if we pray God will hear us, but its not like unjust judge wanting to get poor widow to leave him alone!
How are the details in our case far different (and to our advantage) from that of the judge and widow?