How the price is set
The cash-out offer is the bookmaker's current estimate of your bet's value — with a fresh margin applied on top. You are effectively placing a second bet against your first, and paying commission twice.
When it can make sense
As risk management in rare, specific spots — not as a habit. Systematically cashing out winning positions costs expected value on the long run, which is exactly why bookmakers promote the button so heavily.