Homophobic countries can and will use any kind of law available to get their way.
A lot of them do have laws on immorality which they use on gays.
I think also in Egypt such laws are used for gays.
Also, I'm told that some states within the US still have sodomy laws.
Laws applicable on sodomy / assfucking between straight people as well as gays.
They are almost never used but still in existence and come in handy for police now and then!