I am not implying that there are no good reasons why someone should bail out after accepting. But you should have a very good reason for doing so. Someone else's offer that's $5k higher is not one of them.
Conversely, your company should also not fire you just because someone else showed up who is willing to do your job for $5k less. There's a certain amount of common decency that can be expected from both sides - if not for ethical reasons, then at least for practical reasons of not destroying your reputation.