So it's all about paperwork.
I would guess. I mean, I can't imagine that someone would be punished for leaving a position that he doesn't want to be in. That's not good for the person in question or for Starfleet. More oppressive governments on Romulus or Cardassia might have different rules, but the Federation seems to be okay with people coming and going as they please, as long as they don't break any rules in the process.