Long time I wondered why Christ was tempted: (Heb. 4:15) “For we don’t have a high priest who can’t be touched with the feeling of our infirmities, but one who has been in all points tempted like we are, yet without sin.”

God cannot be tempted and Christ is an image of God.

A few minutes ago I’ve understood this: He was tempted not with the purpose to make Him himself to take a right decision (He always makes right decision). He was tempted with the purpose that others (people, angels, whoever) would see His reaction to a temptation.

In other words, He was tempted to set the world right about responses to temptations, so that others would learn from Him.