The law of total tricks states that the total number of available tricks is equal to the sum of the number of trumps held by the two sides in their best suits respectively.
For example, if NS holds 9 ♥s and EW holds 8 ♠s, the law states that there are 17 tricks available. If EW can just make a game (10 tricks) in this deal, NS can take 7 tricks in ♥ because there are 17 tricks available. However, if EW can make a grand slam, NS can only take 4 tricks.
A major suit game needs 10 tricks to make. If a pair is known to have an 8 card fit from the bidding and the other pair has n cards total in another suit, the law states that there are (8+n) tricks available. As 10 tricks are taken from the pair intending to make the game, the defending pair has (n-2) tricks available. Therefore, if they sacrifice to the total number of trumps they have, it will be a profitable sacrifice (down 2), unless they are at unfavourable vulnerability. If the fit of the side intending to make the game is larger, the total number of tricks available by the law is also larger, hence the sacrifice will be more profitable or even become a making contract.
With strong hands, bidding to the number of trumps will get a makeable contract; with weak hands, bidding to the number of trumps will be a profitable sacrifice. Therefore, the law is a guideline to preemptive bids and sacrifices.