Despite both being spelt Lee, the way it is pronounced in England and the USA is quite different when sounded in Mandarin and again in Cantonese.
As for the spelling this is because:
The Latin alphabet was being used and it only has 26 letters;
The translation system used at that time was Wades-Giles which has problems with tones. Today Pinyin, the better translation system, spells the Mandarin version of Lee as Lǐ；
If it were pronounced in Cantonese it would be Lei; and
Western bias – when the colonials heard Lǐ， they felt it was best represented by the spelling Lee as it was something familiar and easy to pronounce.
Where the names comes from are also radically different.
The English Lee appears to come from lēah, old English meaning a small expanse of grass, a meadow, forest clearing etc. Related English names include Lea and Leigh.
The Chinese Lee arises from the title Dali – as in Dali Gao Yao, a legendary Xia minister who was meant to have served Emperor Shun. the position Dali stood for was the Chamberlain for Law Enforcement.