The reason why you would add the transaction keyword to a do block is because a do block by default does not have transaction capabilities. That means without specifying the transaction keyword the transaction scope will be increased to the next outer block with transaction capabilities. In a worst case scenario the transaction scope could be increased as much as to the procedure block.
The repeat block by default does have transaction capabilities. Therefore if a transaction is invoked within a repeat block ( by updating the database or fetching data with an exclusive lock ) the transaction will automatically be scoped to the repeat block and adding the transaction keyword won't change anything. But, in case there is already an inner block with transaction capabilities ( for example a for each ) you can deliberately expand the transaction scope to the repeat block.
Please be aware that increasing the transaction scope, be it intentional or not, you might end up creating transactions that are much larger than need be and which might introduce all sorts of of other problems.
You might want to make yourself familiar with transaction scope:
knowledgebase.progress.com