Why is it that most muslim countries are against homosexuality?

I was talking this with a friend and we were checking where homosexuality is criminalized and we realized there is a correlation with muslim countries.