Because it is a Islamic country and because Dubai, as part of the UAE is a BIG sponsor of radical Islam and Islamic terrorism, including ISIS. Not to forgot the terrible war in Yemen. They just get away with it by making themselves very useful to the West. Do not mistake the country's modern look for a modern outlook. They tolerate a lot of what they think is degenerate behavior from Westerners, but do you want to run the risk that they will draw the line at a guy in heels? Best to pack some flipflops.