I've personally only ever done this with sours for the unique bacterial cultures used, and like others have said, whether we're talking yeast or bacteria, the bare minimum is that the beer has not been pasteurized. I only ever did it with beers where there was quite a bit of trub on the bottom of each bottle, and that's specifically what I used to get the culture for my own personal beer. Generally the more "craft" the brewery is, the less likely they are pasteurizing. The bigger the brewery, the more likely they are pasteurizing. That said, some small breweries also pasteurize, especially for styles that would benefit from it. But there are also a lot of big craft breweries that don't pasteurize, or at least they don't pasteurize all their beers. I've found this especially to be the case for some of the sour beers by some of the biggest craft breweries in the US where they write on the bottle that the beer will get more sour the longer you age it (which would obviously not be the case if it was pasteurized). And that's not even bringing up the issue that the bottle might have live yeast in it but live yeast for priming and not for fermentation.