D&C 50 was given because the elders did not understand the manifestations of different spirits that were abroad on the earth, which were not uncommon among the members, some of whom claimed to be receiving visions and revelations.
Gospeldoctrine.com pulls together a number of accounts of these kinds of manifestations, so we can know what the elders were up against.
12 Now, when a man reasoneth he is understood of man, because he reasoneth as a man; even so will I, the Lord, reason with you that you may understand.
13 Wherefore, I the Lord ask you this question—unto what were ye ordained?
14 To preach my gospel by the Spirit, even the Comforter which was sent forth to teach the truth.
15 And then received ye spirits which ye could not understand, and received them to be of God; and in this are ye justified?
16 Behold ye shall answer this question yourselves; nevertheless, I will be merciful unto you; he that is weak among you hereafter shall be made strong.
17 Verily I say unto you, he that is ordained of me and sent forth to preach the word of truth by the Comforter, in the Spirit of truth, doth he preach it by the Spirit of truth or some other way?
18 And if it be by some other way it is not of God.
19 And again, he that receiveth the word of truth, doth he receive it by the Spirit of truth or some other way?
20 If it be some other way it is not of God.
21 Therefore, why is it that ye cannot understand and know, that he that receiveth the word by the Spirit of truth receiveth it as it is preached by the Spirit of truth?
22 Wherefore, he that preacheth and he that receiveth, understand one another, and both are edified and rejoice together.
23 And that which doth not edify is not of God, and is darkness. (D&C 50:12-23)
One of the great things these verses teach is that the elders must preach by the Spirit of truth, and the listeners must receive the preaching of the Spirit of truth. I notice there is a lot of repetition and emphasis on the word “preach” in these verses, which would be very helpful to the Saints. The manifestations they wondered about did not involve preaching, but instead involved strange movements, fits, and generally disorderly conduct. Thus, emphasizing preaching would eventually filter out the weird stuff people did.
(Today we focus a little more on the part about having the Spirit of truth, as opposed to perhaps the spirit of speculation or the spirit of contention and controversy or the spirit of emotionalism.)
When the church was restored, there were a lot of false ideas about how someone under the influence of the Spirit would act that were borrowed from other sects. People were familiar with what happened at big revival meetings and may have thought that they had to demonstrate some sort of odd or unusual behavior to prove they were converted or prove they were influenced by the Holy Ghost. And if they couldn’t identify for themselves what the Spirit really did, or if its influence was different from what they thought would happen, or if it didn’t help them prove their spirituality like they thought it should, their insecurity might tempt them to make something up or act odd as though that were the Spirit.
Emphasizing preaching by the Spirit and the necessity for edification helped the Saints know that only edifying demonstrations should be received as from God. Intelligence should be gained by both the preacher and the listener.