They didn't. Wikipedia is misleading.
In fact, Britain had set out with the intent of securing a cession in perpetuity (i.e. forever), and was negotiated down to a 99-year lease by the Chinese.
[MacDonald's] instructions required him to secure another cession in perpetuity. What he negotiated was a 99-year lease: MacDonald was persuaded by imperial officials that it would be awkward if Britain did not follow the precedent of recent grants of territory.
McLaren, Robin. Britain's Record in Hong Kong. Royal Institute of International Affairs, 1997.
It's useful to put this in context. The British scheme was in part motivated (and/or excused) as a reaction to France's lease of Kouang-Tchéou-Wan earlier the same year, which was also a 99-year lease. Under traditional balance-of-power thinking, the British reaction should not be so provocative as to trigger its own reactions from France. In fact, this philosophy is what stopped Britain from pushing to enlarge Hong Kong earlier:
[In 1895] an official report commending an extension and readjustment of the Hong Kong frontier for naval and military reasons met with a divided response due to fears that any action could provoke France to retaliate. Therefore, the French lease of Kwang-chow-wan only 210 miles to the southwest of Hong Kong made it necessary and also possible for Britain to launch negotiations.
Becker, Bert. "French Kwang-Chow-Wan and British Hong Kong: Politics and Shipping, 1890s–1920s." British and French Colonialism in Africa, Asia and the Middle East. Palgrave Macmillan, Cham, 2019. 181–221.
The same mentality was clearly evident in 1898. As mentioned previously, the British negotiator, Sir Claude McDonald, originally sought to acquire the New Territories permanently. He was persuaded to accept a lease when the Chinese argued that the other Great Powers would follow suit. In MacDonald's own words:
The question of the nature of our title to the extension of territory was more troublesome. I tried to obtain an absolute cession, but could not resist the force of the argument that all other nations who have obtained leases of territory would follow suit, which might be inconvenient for ourselves. The principle of a lease having been admitted a term of ninety-nine years seemed sufficient.
Britain, Great. Correspondence Respecting the Affairs of China. HM Stationery Office, 1898.
Clearly MacDonald did not consider a 99-year lease to be literally "as good as forever", only that it "seemed sufficient". This was a compromise over strategic concerns.
A 99-year lease seemed sufficient.
It's easy to see why MacDonald thought so. Europeans of the time generally believed (correctly) that Qing China was in terminal decline. British rule in Hong Kong expanded in 1842, 1860 and 1898: only a few decades apart each time. For all they know there would be another opportunity soon enough. No one could know at the time that European imperialism was itself heading towards terminal decline within a few decades.
Moreover, remember that Britain was in China for commercial interests, and not the land per se. The general trend of the time was to ensure trade access, e.g. Open Door Policy or the 1900 Yangtze Agreement. Land did not inherently benefit this.
As we see today, ownership of Hong Kong is no longer vital to British commercial interests. Nor is it tenable in the face of an industrialising China, as demonstrated by the return of Macau and the perpetually ceded parts of Hong Kong, or the seizure of Goa by India.
So indeed, the 99 year lease ended up being as good as "forever".