So you don't know what happened and how it went down, then.
That's not the first time I've seen this thought- but what actually happened is that Biles figured out on her first jump that she got in to a mental position to doubt her ability to hit anything. So by dropping out, she gave her team a chance of winning.
Seeing her score in that one jump, had she stayed in and competed, the US would have probably finished in last place. Instead, since she recognized that she would not be hitting her performance, dropping out put an alternate in place.
Because of Simone Biles dropping out of the competition, the US *almost* won the gold.
this very much wasn't her "not feeling like it anymore" this was "why did I just get lost on that jump? OMG, if I continue, we lose".
Also, had she continued, the risk of getting injured really badly went up quite a bit- try one of her massive attempts, and get lost in the middle- the landing could have been a disaster for her.
One other thing- she didn't just go an close herself into the locker room- she went back out on the floor to support her team. Again, because she dropped out, they still almost won.