Because this homeless shelter is also allowing women in?
They're not restricting on the basis of the violence of the homeless, they're restricting on the basis of gender. Sure, men might be more violent than women, but you know who are the most violent? Violent people.
If their problem was with violence, they'd allow in non-violent men and bar violent women. But no, they bar all men and allow all women.