This surfaces, as a UI affordance, the fact that an LLM can give a slightly different answer to the identical prompt each time. Instead of rewriting the prompt, the user asks for "a different attempt" with one circular-arrow button.
Rather than discarding the previous answer outright, many implementations keep it as a swipeable version ("1/2", "2/2") — the regenerated one might turn out worse, so leaving a way back is the safer default.
While regenerating, the button turns into a spinner to confirm the request went through, and the new text — ideally streamed in again — arrives visually distinct from the one it's replacing.
When to use
Fits answers with many valid outputs — writing, code, summaries. For a fact lookup with one correct answer, regenerating mostly just returns the same conclusion again.