It was explicitly racist, at least in the UK. The cabinet meetings discuss explicitly racist motivations, particularly from Churchill who campaigned for this in the face of the economic need for an influx of labour. Justifications were sought that could be made to appear objective. If you can watch it somewhere, this documentary was depressingly eye opening https://www.bbc.co.uk/programmes/m00068sk, but you can probably read the salient points in related articles: https://www.theguardian.com/tv-and-radio/2019/jun/24/the-unw...
> Churchill who campaigned for this in the face of the economic need for an influx of labour
It's always racism vs. economic reasons - not conservative enough for your voters, you lose votes; not economically sensible, you bring ruin upon your country. We have already saw this with Brexit.