It was a certain ambition of not just his, but many other imperialists. When German East Africa fell in 1916 to British rule - as the Tanganyika protectorate - Britain had a continuous line of possessions stretching from Cairo to the Western Cape.
As most things were, the railway would have just been a symbol of what Britain could do much better than anyone else. It wasn't only his dream, but what fuelled the wider political will was definitely sheer over-ambition. As such, when economic realities - e.g. the debt from the Great War or the Great Depression - kicked in, the railway was prohibitively expensive.
By World War Two's end, decolonisation began and so the political will for the railway itself eroded.