Unless it buys you the time you need to beef up your defenses and alliances. For the next event.
It prohibits them from joining alliances, and in giving up territory, it reduces their strategic depth the next time Russia decides to make a move.
And of course, it also gives Russia itself time to look at this invasion, see what went wrong, rebuild the forces it lost, and try again. Given that Russia is a much larger country, and that Ukraine has been wrecked in many respects, it's a deal that favors Russia long-term.