Luther said that that it is prayer, meditation, and temptation that contribute to make a theologian or minister. Trials, testings and temptation have a key role in divine providence. William Cunningham in his Theological Lectures is the best expositor of what Luther was emphasising in this phrase, see here and here.
"Luther places prayer first, and this was nothing more than is justly due to its paramount importance; it is the imperative and primary duty of all who desire to become acquainted with theology, and qualified for the office of a minister of the gospel, to abound in prayer and supplication. It is quite true that men without piety and without prayer may read many theological books, that God may uphold and sustain them in the ordinary exercise of their faculties when directed to these objects, as when directed to any others, and that they may thus acquire a large measure of acquaintance with theological topics, and be able to discuss them and dispute about them. It has often been remarked, and the remark is undoubtedly true, that many men have written ably and convincingly in defence of the truth of the Christian revelation, in opposition to the attacks of infidels, who never understood or comprehended the leading truths contained in the revelation which they proved to have come from God, and who of course derived no real permanent benefit from the revelation which God had given them.
You can have no thorough and intimate acquaintance with divine truth, and especially you will be very ill fitted to explain and apply it for the benefit of others, unless you have had some practice in actually bringing it to bear upon the resistance of those temptations with which all believers are assailed in their journey towards Zion. All the principal truths revealed in Scripture are intended to be instrumental in leading men—those to whom they are made known —to receive Christ Jesus the Lord, and thereafter to walk in him, in opposition to all the obstacles which the devil, the world, and the flesh may interpose. The word of God is the sword of the Spirit, and is continually to be employed in the spiritual warfare; and the man who has not had the benefit of temptation in the sense in which we have explained it, is like one who has learned the use of the sword only from written instructions, without having tried to handle or to wield it, and who, of course, is still very unfit for defending himself against the assault of enemies, and still more unfit for instructing others in the art of self-defence.
The whole doctrines of God’s word have a practical tendency; they have all been revealed to us for practical objects, and they should be all employed for producing practical results...This process of actually applying the word of God and the doctrines which it contains to their great practical purpose in the formation of character and in the regulation of conduct, according to the actual circumstances in which men are in providence placed and the temptations they are called upon to encounter, produces a clear, impressive, experimental acquaintance with divine truth, which cannot be acquired in any other way, and which peculiarly fits them for communicating clear and impressive conceptions of them to others; and it is held as a maxim applicable to all branches of knowledge, that an acquaintance with any subject which qualifies and entitles a man to become an instructor of others, must be thorough and extensive, such as to give him the clearest, fullest and most impressive conception of it himself...Hence it is not uncommon to meet with persons who have not read much, and who have had but little mental cultivation, but who have been long in the habit of applying the word of God and the doctrines of the gospel to the object of being enabled to resist temptation and be directed in difficulties, to be comforted in trials, and to be guided and encouraged in their spiritual progress, and who, by the study of the Bible, and by this process of practically applying it, have acquired an intimate and thorough knowledge of the word of God and of Christian truth, have attained to a clearness of conception on those subjects, and hold their views with a firmness of grasp which many book-learned theologians have never reached, and which all the ingenuity and sophistry of error cannot diminish or impair.
This is a process which ought to be ever going on, and which will certainly not impede but greatly promote your more formal studies in theology. As private Christians, you are bound to be continually resisting temptation, mortifying sin, and growing in grace; and by carrying on this process through the unceasing application of the word of God and divine truth, and by the reflex act of observing the operations and affections of your own mind while the work of bringing divine truth to bear upon it is going on, you will undoubtedly acquire much real practical available knowledge of the word of God and of the truths which it was intended to unfold, and this knowledge is of essential importance to all who are allowed to be put in trust with the gospel. Divine truth is then only applied to its right purpose when it is employed in this way, then alone is it fully seen in its proper light and in its true character, and no one therefore can be regarded as possessed of a full and competent knowledge of it unless he has seen and watched the process of its being subjected to such experiments.
It is your imperative duty, in accordance with the injunction which Paul gave to Timothy, to flee youthful lusts, which war against the soul, to be avoiding every appearance of evil, to be even already enduring hardness as good soldiers of Jesus Christ, i.e. to be mortifying pride and ambition, self-confidence, self-conceit, envy, and worldliness, and to be cultivating and cherishing in your souls all the fruits of the Spirit. In this work you will have temptations to resist and difficulties to encounter. You must employ the whole armour of God, especially the shield of faith and the sword of the Spirit, i.e., under the guidance of the Holy Spirit, you are to be ever employing the word of God and the truths which it unfolds; and by carrying on this process faithfully and conscientiously, and by reflecting on its nature, its manifestations, and its results, you will not only grow in grace and in meetness for heaven, but you will acquire a much more thorough insight into the word of God and the truths of Scripture, and be much more fully prepared than otherwise you could have been for wielding the sword of the Spirit for the conversion of sinners and the edification of Christ’s body.