I am answering this question based on occupational(karmic) perspective of Varna at society level only.
It is well-known that a person cannot survive without doing a karma. Everyone needs to do some karma and every person does karma. Observe the following words of Krishna
With regard to the topic at hand, the Brahmanas have held opinions of
various kinds. Some say that success in the world to come depends upon
work. Some declare that action should be shunned and that salvation is
attainable by knowledge. The Brahmanas say--that though one may have a
knowledge of eatable things, yet his hunger will not be appeased
unless he actually eats. Those branches of knowledge that help the
doing of work, bear fruit, but not other kinds, for the fruit of work
is of ocular demonstration. A thirsty person drinks water, and by that
act his thirst is allayed. This result proceeds, no doubt, from work.
Therein lies the efficacy of work. If anyone thinks that something
else is better than work, I deem, his work and his words are
meaningless. In the other world, it is by virtue of work that the gods
flourish. It is by work that the wind blows.
[Section 29, Udyoga Parva, The Mahabharata]
It is thus evident that, karma is necessary for the existence, as well as for the well-being, of an individual. It applies to the society as well.
The contribution of karma(work) to society is of four kinds. It is a classification of karma, at broad level, needed for smooth run of the society. They are
- Intellectual
- Administration
- Trading
- Physical
Society cannot run in an organized manner if any kind of contribution is lacking. Thus, each kind of karma needs some humans to perform it. Thus, the Varna system is useful in maintaing the karmic structure of the society.
According to the three modes of material nature and the work ascribed
to them, the four divisions of human society were created by Me. And,
although I am the creator of this system, you should know that I am
yet the non-doer, being unchangeable.
[13, 4, Bhagavad Gita]
The names of Varnas based on the work are Brahmanas, Kshatriyas, Vaishyas and Shudras respectively.
The Varna of a person is assigned due to the behaviour and activities of the jiva inside the person only. And hence Krishna told that he is a non-doer. It is the responsibility of the Varna to contribute its kind of karma to society. Every kind of karma is important to society.
Now, why do scriptures ask them not to gather wealth?
The kind of karma contributed by the Shudras is physical in nature. There is no need for them to gather wealth. It is the responsibility of other varnas to provide the required wealth to shudras. If a shudra shows interest and starts performing activities for gaining wealth only, the physical contribution by the shudra may start decline. It is same as a Brahmana doing only physical activities with no intellectual contribution to society. It is a discourageable phenomenon. Observe the following lines by Vamana
O King, controller of the entire universe, although you are very
munificent and are able to give Me as much land as I want, I do not
want anything from you that is unnecessary. If a learned brāhmaṇa
takes charity from others only according to his needs, he does not
become entangled in sinful activities.
[17, 19, 8, Srimad-Bhagavatam]
Thus, a person should always be interested in gaining all the resources needed for enhancing or implementing karmas of one's own Varna only. If any resource, that is not needed by one's own varna and if gaining of such resources causes the person to distract from one's own responsibility, then it is always discouraged for any varna.
There are many and similar restrictions for sanyasi, guru and (other three) Varnas also. All the restrictions are based on the occupation of the person. If no such restrictions are present, the person neglects his occupational responsibilities and thus affects the society in a wrong way.