First of all, it wasn't to get information, or at least not in the way we might ask our teacher for clarification. Jesus knew what was in people's hearts and He had a great grasp of what was happening in the situation around Him. From that point of view, He knew exactly what was going on.
This means He must have had something else in mind. What He was doing was coaching with questions. He didn't ask to get information,
He asked question to provoke thought.
You'd think He'd want to get busy straight away teaching and filling heads with knowledge, right? However, once He delivered the sermon on the mount, His focus seemed to really shift to a using high percentage of questions when He spoke.
Why provoke so much thinking? Surely He wanted obedience?
It wasn't just idle, navel-gazing thought but actually thought that causes the hearer to be unsettled from their 'I already know all this' state.
And Jesus is still doing that with us today.