I had prejudices towards Dubai since everywhere online they show it is a country based on oil and slavery. After visiting, I was positively surprised.
It’s one of the few utopic places where an employee can still earn and save something with dignity.
People consciously decide to live and work there. Market regulates everything: office jobs pay a lot; construction jobs do not require much skill so there are people ready to do it for very little so the salaries adapt to that.
Oil has very little influence on the overall GDP. It is mostly based on commerce and tourism.