When the Wire.endTransmission() is called in a while-loop, it could be called over and over again. The Wire.endTransmission() should not be called on its own. It is part of the: Wire.beginTransmission - Wire.Write - Wire.endTransmission.
At this moment, calling the Wire.endTransmission() once more might restart the complete I2C bus transaction. That is however not documented, and it might change in the future.
The Wire.requestFrom() is polled a number of times, until the same amount of bytes is received that was requested.
I have seen that as well in the Sparkun library, but that is to poll the sensor until the data is ready. It is not to compensate for a bad I2C bus. Since you already have the appropriate delay, I suggest to call Wire.requestFrom() just once and return an error if it fails.
When the Wire.endTransmission() is called in a while-loop, it could be called over and over again. The Wire.endTransmission() should not be called on its own. It is part of the: Wire.beginTransmission - Wire.Write - Wire.endTransmission.
At this moment, calling the Wire.endTransmission() once more might restart the complete I2C bus transaction. That is however not documented, and it might change in the future.
The Wire.requestFrom() is polled a number of times, until the same amount of bytes is received that was requested. I have seen that as well in the Sparkun library, but that is to poll the sensor until the data is ready. It is not to compensate for a bad I2C bus. Since you already have the appropriate delay, I suggest to call Wire.requestFrom() just once and return an error if it fails.