Wikipedia has this to say about Tyrannosaurus’s arms:
…they are not vestigial but instead show large areas for muscle attachment, indicating considerable strength. This was recognized as early as 1906 by Osborn, who speculated that the forelimbs may have been used to grasp a mate during copulation.[58] It has also been suggested that the forelimbs were used to assist the animal in rising from a prone position.[53] Another possibility is that the forelimbs held struggling prey while it was dispatched by the tyrannosaur’s enormous jaws. This hypothesis may be supported by biomechanical analysis.
Keep in mind that for a creature to “build” large, strong limbs diverts limited resources otherwise invested into other parts of its body. T. rex & its small-armed cousins were successful species for millions of years until the K-T boundary catastrophe. Evidently its huge legs, tail, and jaws alone were a winning combination – and as the article points out, the arms were not totally pathetic, either.