It's an Islamic country and interpretation of dress codes can be very conservative. There are some that don't allow alcohol so there wouldn't be a bar to refuse entry in the first place.