1st generation immigrants don't integrate because they don't want to.
Most don't want to.

Hardcore muslims don't want to integrate because they think it destroys their culture. Like women having too many rights, men not being in control, etc.
See what they're trying to do in the Netherlands.

2nd generations, those born in the respective country to immigrant parents, assimilate the culture because that's what they're growing up with.

Here in South Florida young latinos are very americanised, they watch more english-language TV, while their parents watch almost exclusively Spanish-language stations.

You also have immigrants who congregate in their own communities because it reminds them of home, they want to speak their own language for the same reason and when you have that you don't really feel the need to fit in with the locals. Which of course backfires