What ultimately became Kenya was first colonized not by the British government but by a private corporation called the East Africa Company. This was part of a general colonial rush by European powers to carve up Africa between them in order to secure its abundant natural resources, a violent and destructive process that still has harmful ripple effects in Africa today.
The East Africa Company set up its colony with two major constraints: The first was a series of treaties and alliances between Britain and other European powers, restricting the terrain they were allowed to claim. The second was the availability of natural resources and valuable trade routes. The position of Kenya was set in part by the desire to construct a railway from the coast to Lake Victoria in order to facilitate the transport of goods from central Africa to Europe---as a result Kenya extends from the coast to Lake Victoria. Eventually the Crown saw that the East Africa Company was not up to the task of managing an entire country of millions of people, and dissolved the corporation and established the East Africa Protectorate as an official British colony. Eventually the name was changed to Kenya in a half-hearted effort to signal a friendlier relationship with local people.
In general, the problem with the way countries were established in Africa is not what did influence the geography, but what didn't---the existing alliances and conflicts between local tribes were basically ignored, as were all ancestral claims to the land. European powers set the borders according to what seemed most convenient or expedient for their purposes, and where the local people disagreed they were forced out or even killed.