Why do so many classes define a ::t() method? I've encountered MANY methods substituting the translation function — forms, entities, plugins... What is the point when there is the global t() function that has exactly the same code

return \Drupal::translation()-&gt;translate($string, $args, $options);


as the methods do?
The point is unit testing. You can extend the class and override t() or just create a mock out of it. Global functions are not available during PHPUnit runs and in general just a pain.

Since this became so popular let me link the relevant handbook page on global functions and unit tests.