To add, I can see how this is a good trick for the sake of calculating probability:
Treating the cards as distinct allows us to have 52C5 unique 5-sets, and 13C3 unique 3-sets of hearts, and 39C2 unique 2-sets of non-hearts. 13C3x39C2 gives us the number of 5-sets with 3 hearts and 2 non-hearts. Dividing this by 52C5 gives us the relative frequency of obtaining such a set out of all the sets possible, and thus it's probability.
I guess, as this trick seems a little counter intuitive at first, how else could one do the Q? That got me thinking. I have a pack of 52 with 39 non-hearts and 13 hearts. I want to know the probability of selecting 5 cards such that 3 are hearts, and 2 are non-hearts.
Heart -> Heart -> Heart -> Non -> Non ... is one way
Heart -> Heart -> Non -> Heart -> Non ... is another way
etc.
And there's many ways of getting 3 hearts and 2 non-hearts (5! / 3!2! ways infact). Each of these ways has it's own assigned probability; it's conditional since each card taken affects the probability of the next card taken, and so on.
If you work out the probability for each way, then sum them, you should get the probability of 3 hearts, 2 non-hearts. But this is clearly a longer method!