They are fearful of their life in Myanmar or putting in detention camp until deportation which is unlikely to happen. That’s it. At camp at least to some degree they have a free life despite poor living condition.
Lastly they are UN designated refugee not illegal. And India is not doing any good job rather displaying communal and anti Muslim mindset.
Rohingya are fleeing to Bangladesh and from there they are making their way into India. If they would have been refugees, they would be in refugee camps in Bangladesh waiting for things to improve in Myanmar so they can go back. No, they are illegal migrants in India when they cross international border 'illegally'. Again India is not party to the 1951 UN Refugee Convention, we don't have any obligation to host anybody. So, 40000 registered ones living in designated camps are fine but 400000 unregistered illegals living illegally without any papers from Kashmir to UP to South are not okay. They are even a security risk with reports of enemies of India using them for notorious activities.