Song Jiang in the Water Margin is only a low-grade official, whose position is the head of the department, that is, the head of the official who manages the affairs related to the county prison, but in the book he appears to be very rich, so where does this money come from? First of all, in ancient times, as a low-level county magistrate, especially in charge of the prison system, they had a certain amount of power, so they had a part of the gray income, and many prisoners asked the abbot to live better in prison or suffer less flesh and skin, and their families or themselves would pay bribes, so he had a part of the gray income. Secondly, the situation in his family itself is relatively good, his father, Mrs. Song, is a large landlord himself, and there is no shortage of money in his own family, and his position as an official is also bought for him by his father and others, so from this point of view, Song Jiang himself is not a person who lacks money, in addition to other income. Because he is righteous and helpful, willing to spend money and socialize for his friends on the rivers and lakes, so these people who have been helped will later go to repay the favor and also give Song Jiang some money, so in general, Song Jiang is not short of money, so he can spend money, and I will talk about it from several aspects below:

The situation of the Oshi of the Song Dynasty
In the Song Dynasty, the oshi in the county court was not of the rank, and he was a scrivener in the yamen, and his main responsibility was to write the clerks. The Oshi was an official, not a formal official. (Because the number of officials in ancient times was limited, when exercising administrative power, a few people were far from enough, so it was necessary to increase the number of personnel, so there was a position of official to help officials handle official affairs.)
In the general prefectures and counties of the Song Dynasty, there was a position of escort in their yamen, some recruited by officials, and some sent by dispatch. At that time, the officials in these yamen were mainly responsible for handling the collection of taxes or handling prison lawsuits, while the detention department was mainly responsible for the collation of case files or the county prison management officials, generally without rank, but in the Song Dynasty, the prefecture ya had the post of the escort division, and the central criminal department also had the position of the detention department. According to the relevant political records, there are usually about 8 oshi in a county. And Song Jiang is the first of these 8 escorts, and it is also the most powerful escort.
Song Washishi belonged to the bureaucratic class, and at that time there were many times more scriveners than officials in a yamen, especially in counties with large populations, who generally enjoyed the privilege of exemption from military service. In terms of dressing, they could wear long shirts (black only), and they could tie a long ribbon of Confucian clothes and pedal boots like the famous xiucai, while the ordinary people at that time could only wear short shirts and high-top shoes. So you can see the difference between the two from the dress.
Song Jiang spent money on the situation
In the Water Margin, although Song Jiang is only a small abbot in the local county, his power is not small, he is a person who can talk to the county officials, so the local rich and powerful people need the government to come forward, they will ask Song Jiang to mediate from the middle, and at the same time give him a part of the money, so Song Jiang is very powerful in the local area, plus his family itself is rich in the local area, so he is not short of money, although the income as an official will not be high, but he does not care about these.
But although Song Jiang is very popular and willing to make friends all over the rivers and lakes, that is also to see people cooking, he is not a person's help will help, generally powerless and powerless poor people want to ask him for help, it is impossible, we can see from the description of Song Jiang in the Water Margin.
The people song jiang has helped are basically capable, no matter what kind of ability, these people are not ordinary people can compare, and these jianghu people are more moralistic, they will also return Song Jiang after accepting Song Jiang's help, so Song Jiang's behavior of scattering wealth has brought him great benefits.
To sum up, although Song Jiang in the Water Margin is the leader of a county official, he seems to have a very low status, but he has a lot of real power, and he is not short of money, and the people he is willing to help are not ordinary people.