If I have $n$ objects, and asked the number of ways to choose $k$ of them, the answer is $\binom{n}{k}$ (example problem 1). Similarly if I have $n$ objects and asked to put $a$ in one bin, $b$ in another, and $c$ in another, I think the number of ways I can do this is $\frac{n!}{a!b!c!}$ (example problem 2). I'm sure but I don’t think the answer changes whether the objects are, say, all the same (color) or are partially or completely distinct, despite the fact that if the objects are identical the combinations “look” the same (unless there's some other way to tell the objects apart that isn't explicitly stated).
However, in a stars and bars problems, the objects are indistinguishable but the bins are, so in this case the distinguish-ability matters. How do I identify when having distinguishable objects matter and when not?
It always matters whether thinks are distinguishable. In your first example, if the $n$ items are identical there is only one way to select $k$ of them, not $n \choose k$. Similarly in your second example there would be only one way if the objects were identical. In a typical stars and bars problem the objects are not distinguishable, but if they were there would be many more ways to put them in the bins.
Sometimes it is difficult to determine whether the objects are distinguishable or not, but that is a different question.