The short answer is that in his state of humilation (while on earth) Jesus did not fully use his divine omniscience.
Here are excerpts from a couple of Lutheran theologians. The first one is a general commentary, the second one is some heavy-duty material meant for seminarians. Note that Lutherans are not afraid to say something is a "mystery." That which may be difficult to fully comprehend may nevertheless be apprehended (grasped) through faith.
Excerpts from Christian Dogmatics, Vol. II, Francis Pieper, Concordia Publishing House, 1975 edition, pp. 162-166.
Communicated OmniscienceHoly Scripture ascribes to Christ, according to His human nature, not merely exceptional human knowledge, 229 but also divine knowledge, or omniscience. As Christ performed miracles in an altogether different manner than did the Prophets and the Apostles, namely, by His own omnipotence, so also, when performing His prophetic ministry, He proclaimed the Word of God in an altogether different manner than did the Prophets and Apostles. These, John the Baptist for example, spoke "of the earth" ( ek ths ghs ) , that is, by revelation taking place upon earth, or by divine inspiration, while Christ, speaking as "He that cometh from heaven," declared what He had seen and heard "in the council of the Holy Trinity" and continually and incessantly saw and heard, while on earth, as "the only begotten Son, which is in the bosom of the Father," and "the Son of Man, which is in heaven." 230 In other words: Christ taught on earth, not from human, but from divine knowledge, the source of which was His uninterrupted oneness with the Father and the Holy Ghost. ... Now, since Christ's teaching took place in and through the human nature, His human nature plainly shared in the divine knowledge. This also is the meaning of the words which, in the same connection, are said of Christ as God's preeminent messenger: "God giveth not the Spirit by measure unto Him," while believers are said to have the gifts of grace only "according to the measure." 233 According to the context, the expression "gift of the Spirit without measure" designates the communicated divine knowledge. 234 Again, that Christ, according to His human nature, used divine knowledge, is apparent from the fact that, as Scripture teaches, 'He knew the hearts of men," which certainly is the prerogative of God. 235 Alongside this divine knowledge of Christ, which in His state of humiliation He had according to His human nature, Scripture ascribes to Him limited knowledge. 236 It predicates of Him, according to His human nature, a twofold knowledge: the knowledge communicated by the divine nature to the human nature by virtue of the personal union, and the knowledge peculiar to the human nature as its natural, essential attribute. The former is infinite (omniscientia) , while the latter is finite and capable of growth (scientia naturalis, habitualis, experimentalis ) .When Scripture says that Jesus increased in wisdom, this is to be understood as an actual increase in the natural knowledge essential to the human nature, and not merely as a seeming one. Aegidius Hunnius rightly says: "What Luke writes is most certainly true, for Jesus as a youth increased in wisdom not only in appearance, but in deed and truth or, as Luke writes, 'before God and men.' " 237 But how could there exist in one and the same Person both limited knowledge and divine omniscience? In the same way as there was in one and the same Person both omnipotence and limited power, indeed feebleness and death. As divine omnipotence, so also divine omniscience did not always become operative in the human nature; it was active only so far as it was necessary for the performance of Christ's office. Divine omniscience, for example, did not become functional with regard to the day and hour of the end of the world, since the Day of Judgment is not to be published upon earth, but, according to God's plan, is to remain hidden from men. 238 This, then, is the case: As by "the resting of the logos [LOGOS]," that is, by the inactivity of the divine omnipotence in the human nature, there could be in Christ both limited power with poverty , weariness, suffering, and death and divine omnipotence, so by the "resting of the logos [LOGOS]," that is, by the inactivity of the divine knowledge in the human nature, there could be in Christ both limited knowledge and divine omniscience. To this fact the objection has been raised that it is difficult, indeed impossible, to conceive of the communicated omniscience as being quiescent (actus primus ) or active ( actus secundus) .Reformed theologians have ridiculed this distinction. Even the Princeton Review, some years ago, designated this as "nonsense," It said: "Retracted omniscience is, of course, not omniscience at all. To speak of potential omniscience is simply to talk nonsense." 239 The difficulty must indeed be admitted, as also the Lutheran dogmaticians have always admitted it. But, after all, the quiescence of divine omniscience is no more difficult to grasp than is that of divine omnipotence. The fact that He with whom divine omnipotence and divine life were personally united could endure poverty, suffering, and death is no more conceivable than the fact that He could be ignorant of anything while divine omniscience was united with Him personally. The difficulty for our intellectual comprehension really does not begin with the twofold knowledge which Holy Writ reports of Christ, but it goes back farther. It has its inception at the point where infinite God and finite man became one Person. Those who accept this fundamental Scripture fact, despite its incomprehensibility , and also admit the weariness, suffering, and death of Christ's human nature while it was united with the Person of the Son of God, reveal the very opposite of wisdom and scholarliness if subsequently, when faced with the particular Scriptural facts of Christ's miraculous theanthropic life, they become so agitated that they speak of "nonsense" as soon as they hear of "retracted omnipotence" or of "retracted omniscience."
To assist students of Christology in visualizing the quiescence of the divine knowledge in the human nature of Christ, our Lutheran dogmaticians have reminded them that man, while asleep, has certainly not lost his knowledge, but that it merely lies dormant or is reduced to a condition of inactivity (actus primus) . 240 The illustration is fitting, for there is indeed such a thing as a dormant knowledge. It was not so long ago that psychologists spoke quite correctly of "a knowledge that had sunk below the threshold of consciousness." It is well, however, that our dogmaticians also declare that by the analogy they do not wish to prove, but merely to illustrate somewhat the paramount fact attested by Scripture. In Christology we are dealing with a dormant divine knowledge in Christ's human nature. Divine knowledge, of course, cannot be conceived as dormant, but must be regarded as functioning without interruption (actus purissimus ) .At this point, however, we do not deal with divine knowledge per se, but with divine knowledge in so far as it is communicated to the human nature of Christ and was, like omnipotence, both active and inactive, as the discharge of His office demanded. 241 But what, then, becomes of the unity of Christ's consciousness? Let us bear in mind that at this point we are facing not a theory, but a fact; for Scripture definitely tells us that in the one Person of Christ there are both unlimited divine knowledge and limited human knowledge, as has been shown above. In the last analysis, what matters is not whether we can intellectually conceive of a thing, but whether or not it is a fact. Even Boehl admits this truth when he writes of the divine omniscience of Christ: "Jesus Christ, the eternal Wisdom, did not apply this wisdom. That fact cannot be explained rationally. We cannot tell how he could relinquish omniscience, and, as it were, forget. But that He did not use it is a historical fact." 242