SahuKahn has correctly pointed out that additional time is added on for substitutions, assessment of injury to players, removal of injured players from the field of play for treatment, wasting time and any other cause (which seems like an overly liberal "catch-all" clause!?). The relevant reference is on page 29 of the 2014/15 FIFA Laws of The Game.
Generally, as seen in Les Arbitres, this is a rough estimate rather than an exact calculation (I can't remember which match it is in the documentary, but at the end of one of the matches, there is a conversation between the referee and fourth official in which the referee says "one minute will do" or similar).
Unlike many other sports, such as ice hockey and futsal, the clock is not stopped whenever the ball is out of play. The ball ends up being in play for 60 - 70 minutes (on average) in top-flight professional leagues. 
Since the referee
will should add on all time lost by time wasting, the advantage is not necessarily in soaking up playing time, but in breaking the attacking rhythm of the opponents. Also, delaying the restart can also give enough time for defenders to get back and cover, especially if a foul is committed when there is a tactical advantage and the attacking team wants to take a quick free kick.