It’s the job of wildlife management to set the limits on male or female hunting of elk. If the numbers are too low then they only allow males to be taken. if the numbers are high then they allow females to be taken also.
There’s also the fact that you can slaughter the males with much less devastating effect on overall populations than comparable killing of nursing and foal bearing females.
In some places at some times, you can hunt does. Generally the males are bigger and, as @KNOWITALL mentioned, they make a better trophy. But does do have a good amount of meat and are generally a little younger than the buck…more tender.