In the case of Laptops, the OS makes the decision based on power consumption. Since the battery is a priority for laptops, the OS may switch to integrated GPU, which offers better power saving. In the case of Desktop, there is no power-saving mode, and hence dedicated GPU is selected most of the time. But in case it is not, then you can change it.