While I agree that it's probably not a good idea to write on some topic just because it's popular, I also disagree that quality is all that matters. It's a good idea to think seriously about the topic of your writing sample and to be slightly strategic sometimes. There are several considerations to take into account. First, you want a topic that's not too niche and doesn't require too much setting up for someone who's not familiar with the literature. This is because the person who reads your writing sample might not work in your particular subfield, much less in that particular area of your subfield. Second, it's still preferable to have a paper on a topic that philosophers still actively engage in. While it's true that working on something you're not interested in just because it's a hot topic will probably not turn out well, a paper on a popular topic will help your chances. This need not be a gimmick. There are legitimate reasons to prefer a more current topic: readers of your writing sample are more inclined to get excited because it deals with questions that they're still interested in and it shows that you're keeping up with the forefronts of research. Again, it's obviously a bad idea to work on something you're not interested in just because it's popular but you might have multiple topics you're interested in and how accessible and current each topic is should factor into your consideration of topic choice.
For what it's worth, when I applied, I got into the three schools (two in the top 15). All three schools had faculty members who work on the topic of my writing sample and whom I cited in my writing sample. I didn't get into any of the schools that didn't have people who work on that topic, not even much lower-ranked schools. So, from experience, I'm inclined to think that topic choice, and not just the quality of your writing sample, is an important factor in deciding where you end up getting accepted.