What purpose is it to use Windows Communication Foundation in relation to SharePoint 2013? It would be great with concrete and practical example.
WCF can be used in two different ways in SharePoint. Either you want to expose content externally through a WCF Web Service, or you want to access content living in an external system. Using WCF in these cases makes your service very reliable and secure, assuming you're implementing Guidelines and Best Practice.
Also I suggest you read through the great article How to: Create an OData data service that sends notifications to BCS in SharePoint 2013 which guides you all the way to a successful implementation of WCF in SharePoint:
This article describes how to create an ASP.NET Windows Communication Foundation (WCF) Data Service to expose the AdventureWorks 2008 R2 LT sample database. This enables you to access the data through the Open Data protocol (OData). When access is established through OData, you can configure a Business Connectivity Services (BCS) external content type that will enable SharePoint 2013 to consume the data from the external database. To further enhance this OData source, you can add service contracts to the WCF service that will enable BCS to subscribe to notifications that indicate that the external data has changed.