Yes, sometimes it is absolutely necessary to do so. If you want to get consumer feedback on a particularly masculine product (razor blades), it may make sense to only ask men.