How come SN Goenka thought that buying milk does not lead to suffering? During the lectures on a 10-day vipassana retreat, SN Goenka made it clear that an action is unwholesome not only when it directly causes suffering - e.g. shooting at sentient beings, but also when it causes it indirectly - e.g. when one sells weapons.

How to reconcile that with the fact that milk and dairy products are available for eating during the retreats? There is no doubt that buying such products amounts to supporting the dairy industry, and causes suffering of farmed cattle. 

Answers to this question suggest that eating meat or drinking milk is not wrong, as long as one does not kill the animal directly. It would mean that SN Goenka was wrong, and selling weapons is not wrong either. Do I understand it correctly?
It's all about the intentions of the individual.

According to Right Livelihood, one of the types of businesses that should not be undertaken is the business in weapons, which is "trading in all kinds of weapons and instruments for killing". These weapons are used for injuring and/or killing other beings. There is no other purpose for them. So, if you are a weapon salesman, then you have the intention of helping someone harm or kill other beings.

Another is the business in meat where "meat refers to the bodies of beings after they are killed ... also includes breeding animals for slaughter." Here, anyone participating in such a business have the intention of depriving other beings of their lives.

If you read this answer, it says that an actor can go to hell because he had the intention to inflame emotions in his audience, after inflaming emotions in himself.

On the other hand, if you read the story of the hunter's wife in this answer which is from Dhammapada 124, it is evident that the hunter's wife who brings her husband his weapons with the sole intention of obeying her husband, is not at all guilty of having the wrong intentions.

From the Theravada perspective, a person who goes to the supermarket and buys milk and meat that is on the shelf, is simply buying meat, with the intention of tasting this food. This person has no intention of depriving other beings of their lives. The animal was already dead, and this person did not choose the animal or instruct the butcher to slaughter a particular animal. Rather, this person is simply choosing a piece of dead meat off the shelf.

As Sankha wrote in this answer, even farming vegetables that are not organic, cause plenty of deaths by pesticides, land clearing and animal traps. But the person who buys vegetables has no intention to kill insects that die due to pesticides, which are used in the process of growing those vegetables.

Also, it is quite a popular idea in some cultures that you should buy a beggar food instead of giving him money, because he might use that money to buy alcoholic beverages. Then it would be your bad karma, if he becomes drunk using the money you gave him. This is not true according to the Theravada tradition. If your intention in giving money was to satisfy the beggar's hunger (because you believed him), then your karma would only be based on your intentions. But once you know the beggar's tricks, you would do better the next time by buying him food instead.