Egyptian questioned about international friends

When I was in Egypt with my friend (both German), we hung out with a friend of mine who's Egyptian and visited some sights together. It happened many times that they took him aside and asked him lot of questions, like how he knows us, whether he's a tour guide, wanted to see his ID etc and once even wanted to call the police bc his ID expired like a month ago. He himself was very confused about that and said he'd never experienced anything like it.

Does anyone have an expanation for that? Very curious why they acted like that