Textual: This verse repeats the information contained in verse 24. There is no structural or poetic parallelism that makes sense of this repetition. Indeed, what we appear to have here is Mormon distilling a record into a much shorter rendition. It is most likely that this repetition comes because the sources for the two phrases were much further apart in Mormon's source, and they come this close only through the great condensing that he is doing. At the beginning of the next verse we find the introductory phrase "and again…" This appears to suggest that Alma is reading a set of regulations for the community, and simply relating them to us.
Mosiah 18:27
27 And again Alma commanded that the people of the church should impart of their substance, every one according to that which he had; if he have more abundantly he should impart more abundantly; and of him that had but little, but little should be required; and to him that had not should be given.
Mosiah 18:28
28 And thus they should impart of their substance of their own free will and good desires towards God, and to those priests that stood in need, yea, and to every needy, naked soul.
Sociological: In spite of the impossibility of Alma having heard King Benjamin's sermon, the similarities in their social programs for their people are remarkably similar. King Benjamin tells his people in Zarahemla:
Mosiah 4:16
16 And also, ye yourselves will succor those that stand in need of your succor; ye will administer of your substance unto him that standeth in need; and ye will not suffer that the beggar putteth up his petition to you in vain, and turn him out to perish.
Mosiah 4:17
17 Perhaps thou shalt say: The man has brought upon himself his misery; therefore I will stay my hand, and will not give unto him of my food, nor impart unto him of my substance that he may not suffer, for his punishments are just-
Mosiah 4:18
18 But I say unto you, O man, whosoever doeth this the same hath great cause to repent; and except he repenteth of that which he hath done he perisheth forever, and hath no interest in the kingdom of God.
In both communities, the economic order was one of communal sharing. If we can read more into the thin hints we are given, there is a slight difference between the two. As we have already seen, Benjamin's commands were instituted to level a society that had become economically stratified. While those who joined Alma might have been equally stratified in Lehi-Nephi, once they left that city they also left everything behind that had created that economic differentiation. In this new community, all members were starting over, on virtually the same footing.
The difference hiding amid the similarities is that Alma's people were sharing from virtual economic necessity. In the establishment of a new community there would be those who had been able to bring some material goods and food with them. In the course of time, all would be required to till the ground for their own support, but as all farmers know, the land is anything but fair and egalitarian. Alma's people faced the necessity of communal sharing for simple existence, as they had no one else upon whom to rely. It should be noted that Benjamin advocated imparting to the needy, but not the complete communal ownership of goods that Alma's community was practicing.
Indeed, the communal sharing of the early Jerusalem Christian community may have flowed from a similar necessity. Of course the major difference was that the Jerusalem Christians existed as separate entities within the larger Judean population, but the economic/physical needs of the dispossessed were similarly provided through a gospel-based change from selfishness to selflessness (see Horsley, Richard A. and Neil Asher Silberman. The Message and the Kingdom. Grosset/Putman. 1997, pp. 102-3). Similar to the difference between Benjamin and Alma was the economic activity of Jerusalem and the Pauline Gentile communities. While we have clear evidence for the Jerusalem communalism (and a trend of communalism that is also witnessed by the community of the Dead Sea Scrolls - see Schiffman, Lawrence H. Reclaiming the Dead Sea Scrolls. Doubleday, 1995, pp. 106-110 ) there is no indication that the Pauline communities practiced a similar pooling of resources.
Nevertheless, the Pauline communities did stress the communal/fraternal nature of the church and participated in a project to send financial aid to the Jerusalem Christian poor (see the analysis of koinonia "community or fellowship" Brown, Raymond. An Introduction to the New Testament. Doubleday. 1997, 286-8).
Of course there are other social benefits of such communalism. The interpersonal concern required to allow one to impart of their surplus for the benefit of a neighbor also teaches God-like love and compassion. Quite apart from pragmatic foundations, these principles also instruct in the necessary meaning of the gospel, providing a very important and real context in which the gospel might be implemented on a very personal level.