The extension method is given for any class which derives from ClientBase
Sometimes there are limitations where you want to read these configurations from an external file e.g. if you are shipping an add-in to outlook you definitely don't want to ship outlook.exe.config file.
.NET 4.5 adds the capabilities for reading the configuration from external file but if you are developing against .NET 4.0 or earlier versions you face an issue and the only way out is to use a Custom Channel Factory as described on http://www.mssoftwareconsulting.com/msswc/blog/post/Override-WCF-Client-Settings-From-Custom-Config-File.aspx
And instantiate the Channel using the Custom Channel Factory. However this class doesn't have a method to configure federation and attach appropriate tokens to the channel to call the CRM Online service successfully.
The attached sample provides an additional method in this class which can be used to attach proper tokens to the channel.
The sample can be downloaded from here.