Jesus told his disciples a parable to teach them that they always ought to pray confidently and not be discouraged if God does not immediately answer their prayers.
Read & study T4T 18:1And he spake a parable unto them to the end that they ought always to pray, and not to faint;
Read & study ASV 18:1