It's not at all. The Muslim man is fine using non Muslim sex workers, because he views non Muslims as lesser, and dirty.
Upon learning the woman was Muslim he called out that she was defiling herself, by acting like the lesser humans.
Similarly, he probably felt bad about himself because his use of a sex worker who was Muslim was more objectionable than if he found a non Muslim sex worker.