Can also depend on the personnel at the managers' disposal but the main point is to negate an attacking threat from the oppostion.
I can recommend Inverting the Pyramid by Jonathan Wilson. A thoroughly enjoyable read charting the change of tactics using the formation as the basis over the past century from the 2-3-5 to the 4-5-1.
http://scotlandonsunday.scotsman.com/sport/Book-review-Inverting-the-Pyramid.4260423.jp
http://www.thepickards.co.uk/index.php/200908/inverting-the-pyramid-a-history-of-football-tactics/