In English one of the uses of "by" is to describe the quantities of batches. It has two general forms.
First, in the most literal way, we would say that you can buy eggs by the dozen (dozen == 12); eggs come in cartons of 12 eggs each, you cannot buy arbitrary numbers of eggs, you can only buy them in cartons, each of which has twelve. So at any given time, you can buy 12, 24, 36, etc. We express this idea by saying that they are sold by the dozen.
Second, that locution has come to be used to indicate scale. It is as if it implies, "these are the units you would find most convenient to count them in." If someone says of a terrible famine, "people died by the score" (score == 20), they do not mean that people literally died in groups of twenty, but that approximately several or many twenties of people died. As a native speaker, I would understand that to mean approximately 80 +/- 40. Or, for another example, "he smoked cigarettes by the pack" does not mean the smoker in question stuck twenty cigarettes in his mouth at once, but that he went through at least one, and possibly several, packs each day, or at least at a fast enough clip to recommend buying them more than one at a time. If someone says "within weeks, they were selling the new flavor of jam by the ton", it doesn't usually mean the jam was sold in one ton increments, but that the total amount of orders would most naturally be indicated in tons.
With that explained, the passage you're asking about:
On Friday night, crowds swelled by the thousands in downtown Hong Kong to listen to speeches from organizers
is using the latter sense. It was not the case that batches of one thousand people were showing up together, but rather some unspecified quantity of people showed up, which was some amount best represented by an approximation of a smallish integer and three zeros.