So you've done a complete analysis of how much effort that would take and the loss of reliability inherent in rewrites versus the potential gains at scale?
No, it is not because of Ruby. It is either about not prioritizing performance in their development process or lacking the skills to write fast software. The Gitlab team would probably write a slow application in Go too.
It's mostly due to them not paying developers enough and also having a cavalier attitude about engineering concerns. Their free product is a loss leader designed to sell you their B2B and it doesn't need to be great it just needs to be used. As with the rest of their philosophy the less they spend and can get away with the better for them. From their perspective.