Consider the following hand, with South dealing and both sides vulnerable:

                                                                      ♠️  7 4
                                                                      ♥️  7 3
                                                                      ♦️  A K J 6 4 3 2
                                                                      ♣️  5 2

        WEST                                                                                                                  EAST
♠️  J 8 6 2                                                                                                             ♠️  Q 9 5 3
♥️  Q J 10 6                                                                                                          ♥️  8 5 2
♦️  9                                                                                                                     ♦️  Q 8 5
♣️  Q 6 4 3                                                                                                           ♣️  J 10 7

                                                                        ♠️  A K 10
                                                                        ♥️  A K 9 4
                                                                        ♦️  10 7
                                                                        ♣️  A K 9 8

The auction proceeded as follows:

             South                           West                             North                             East
             2NT                              Pass                              3NT                               All Pass

Opening lead:  ♥️Q
When dummy comes down, you as declarer count eight top tricks: two spades, two hearts, two diamonds and two clubs.  With careful play, you’ll take many more tricks in diamonds.  Win the  ♥️A in hand.  Then run the ♦️10. 

When West plays the ♦️9, play low (preparing to lose a diamond trick, presumably to East’s ♦️Q).  If diamonds split 2-2 (or if East holds the stiff ♦️Q), you’ve lost a trick unnecessarily.  But taking an early loss in diamonds buys insurance whenever diamonds fail to split 2-2. 

If you were to overtake the ♦️10 with the ♦️A and play the ♦️K in the hope that diamonds split evenly, a nasty surprise would be awaiting.  The remaining diamonds in dummy would be isolated, and you’d have to settle for the eight tricks with which you started: down one. 

But all this can be avoided by virtue of a “safety play” in diamonds.  Allow East to win the ♦️Q at Trick Two, win any return and claim the rest for 12 tricks: six diamonds, two spades, two hearts and two clubs: 3NT bid and made with three overtricks.

Think of a safety play as a means of assuring a contract when all that is necessary is to buy cheap insurance through the early loss of a trick.  In retrospect, the loss may not have been necessary; however, assuring game contracts will generally be far more important than a mere overtrick.