Why are several Muslim countries far ahead of and doing much better than Pakistan?

Malaysia, Indonesia, Turkey, Azerbaijan, the Gulf states, Tunisia, Morocco, Egypt, etc. are all in another league of development, reputation, and success than Pakistan, why?