The diversity train is a relatively new phenomenon.
EU expansion to the East had many factors. One of them being to have less barriers to get a cheap seasonal workforce pick vegetables in western EU countries [1].
Go back a few more decades: Germany in particular asked hundreds of thousands of people from Turkey to immigrate into Germany to help rebuild it after WW2. It's now the biggest foreign-origin population in Germany.
Not sure about France though.
[1]: https://www.nytimes.com/2017/12/11/business/europe-labor-rig...