Why Is Routing Needed?

What is the need of routing diagram?

.

What is the role of routing in network layer?