In India's case it was logistics issue. Initial decision was to keep migrant workers in place and provide them with daily necessities free. Some state govts didn't play ball and cut off electricity and rations. After that it took some time for central and various state govts to run special trains to the people. And it's not thousands of kms, 10s of kms.