I think perhaps the best way to think of this as the expansion of space not being a cause of the matter expanding, but rather the other way around: expanding matter manifests itself as an expansion of space.*
So one way of looking at it is we start off with a cloud of gas that is expanding and cooling. This cloud of gas isn't uniform: some bits of it are denser than other bits. The bits that are dense enough manage to stop their local collapse and form bound objects like galaxy clusters and galaxies. The fact that these bound objects originally came from an expanding cloud of gas is completely incidental: they've collapsed now, and the matter within the object exists in more or less stable orbits around its center.
* The caveat here is that there is no one, unique, correct way of thinking about this. There are many correct ways of thinking about the expansion of space and matter's effect on the expansion. Ultimately you have to go to the math to see what the correct solution is, and then you can sort of go back and figure out the right way to think about the situation so that the correct solution seems intuitive. The correct solution here is obtained by taking a nearly-uniform expanding universe that has bits that are a little bit more dense than other bits, and see how that universe evolves in time. It does exactly what I said above: the parts that are dense enough collapse in on themselves and form stable objects. There just isn't any expansion at all within such stable objects.