@nivinator It was a sarcastic joke, the author doesn't even pretend to give her a reason for suddenly deciding to change her clothes in the middle of an ongoing attack.
It's kind of weird seeing so much overt fanservice when the manga is also somewhat attempting to make this a tense and serious situation. In something like "S-rank monster no behemoth (etc.)" the fanservice feels natural, here it's just kind of awkward and makes the plot even harder to take serious.