Why Did Google Open Source WebRTC?

Why did Google open source WebRTC?

Open sourcing and throwing so much resources and money on a project isn’t trivial. Not even for Google. What was behind its move to do just that for WebRTC? What does it stand to gain anyway?