Jordan is largely a secular state, though its population is primarily (and its ruling family is) Muslim. Religious law does not determine civil law, and drinking alcohol is not a social taboo. Liquor stores operate openly and legally in public; you will surely see some in Amman. You can also buy drinks in most upscale restaurants there and in Petra. I don't recall about liquor stores in Petra, but there's probably one there too.