Why do we have an internal monologue?

What is it for?