HSBC has decided to keep its headquarters in London, ending 10 months of uncertainty with a decision that reflects how the UK political climate has shifted back in favour of the banking sector.