Governments' ultimate aim is to get reelected. Has anyone ever seen a political party anywhere, not go for reelection?
They can only push their ideals so far, before they become unelectable. So, at some point, if the country is a democracy, they have to listen to their electorate.
The majority of the electorate is the same. They have ideals, but again, when push comes to shove, they will not accept potentially millions of people from elsewhere filling the hospital beds, schools, mental health facilities etc.