Hehehe!! Those guys at immigration are very apprehensive sijui kwanini. Instead of harassing people like that, as a country we need integrated systems such that when you come to immigration to apply for a passport, at a click of a button the officer should have all your details on the screen. Data since you were born, schools you attended and so forth.
I was also taken aback when the officers insisted I speak my mother tongue, this was due to the fact that my Swahili and accent are flawless, very hard to tell where I come from or my tribe. I ended up speaking my Kikuyu language convincingly.