In Luke 11:1 one of Jesus’ disciples said to Jesus, “Lord, teach us to pray”. The NIV Study Bible Notes give this explanation regarding Luke 11:1-4:
The Lord’s Model Prayer was given here in answer to a request... The prayer is a pattern for believers , who have already been forgiven for their sins. Jesus speaks here of daily forgiveness, which is necessary to restore broken communication with God.
Jesus was not asking for forgiveness for himself. Rather, he was teaching his disciples how THEY should pray. Matthew 6:9-13 says, “This, then, is how YOU should pray..."
The Bible makes it clear that Jesus was without sin, and even though he was tempted, he never sinned and therefore he had no need to ask his Father in heaven to forgive him.
God made him who had no sin to be sin for us, so that in him we might become the righteousness of God (2 Corinthians 5:21).
He committed no sin, and no deceit was found in his mouth (1 Peter 2:22).
For we do not have a high priest who is unable to empathize with our weaknesses, but we have one who has been tempted in every way, just as we are—yet he did not sin (Hebrews 4:15).