it enhances your learning
You learn more your friend may have learnt a topic well comparatively. He may have picked up some important points the topic which you may have not. When you discuss it with him, you learn these points as well. Similarly you may have learnt some points in a topic which he may have missed, so he learns it in discussion. In this way the learning is shared and you are benefitted.