The KSA is a wealthy absolute monarchy. They absolutely can.
The king may have the right to send all the plumbers back to India and wherever they came from, effective on the coming Monday, but he doesn't have the ability to stop the pipes from being clogged.
It's not just unskilled workers. They rely on many foreign skilled workers too. Two acquaintances of mine are expert concrete engineers. They go out there to work on these building mega projects like the Burj Khalifa, as well as ones in KSA. There is little local engineering expertise; it's all brought in. When you're mega rich, it's easy to do that. It would be better to develop their own expertise and industry and have a more balanced economy, as well as a more secular society that would value such careers, but that takes time as well as the desire to change their economy and society to permit it. It's not clear they have the desire or will to do so.