Makes sense
You are a global company you put your HQ where the time zone makes sense and there are lots of cheap workers. You don't necessarily need to consider access to markets, having an HQ in the Eu wouldn't suddenly allow free access to Huawei for example.
The worse Brexit the cheaper London gets (salary, rents, currency) and the more "accommodating" the government will be. And presumably will still be safer than South Africa