Is a bus driver allowed to make a detour during the journey?

I experienced this recently. I'm just asking out of curiosity, because I don't mind this sort of thing at all. 😄 On a normal bus service, a bus driver stops at a kebab shop at a road junction, gets a kebab for lunch within 2-3 minutes (asks the passengers if they would like one too…