Why did Kenya become a colony?

In the mid 1880's, Europe was busy Colonizing Africa. One of the unclaimed spaces was modern-day Tanzania, Kenya and Uganda, known as the "Sultanate of Zanzibar". Both the UK and German Empire wanted the land. So, they decided to split it up. The UK got Kenya and Uganda, while Germany got Tanzania. However, the UK was too busy sending its resources to South Africa, trying to build her Colonies there. So, the UK ceded the newly gained land to the Imperial British East Africa Company. Unfortunately, less than ten years later the company became bankrupt and the land was once again taken back by the UK government. They set up a Government known as the East Africa Protectorate. In 1920 the protectorate was split up and part of it became the Kenya Colony.