The compensation can be high if you work in Silicon Valley (even though the cost of living is high there). The standard corporate programming job is already paid much worse. Also in a lot of countries that are not the USA, software development is not such a well-paying job.