I accepted an offer that I was given only 2 days to decide. Two weeks later a school located where my wife was about to get an offer called (which we did not know she was going to until then) and scheduled a flyout. During flyout I got an offer, which came officially the next day. I asked my advisor what to do. I still have his email. He said in very few words that I would be crazy not to take the second offer.
I called the first school and apologized deeply, but this was (and has been) the rest of my life. They were mad. I offered to go there for a year, but explained that I could not possibly stay and have a cross-country commute with my wife for very long. They told me they preferred that I would not come for if it was going to be for a short term. But later they did bad-mouth me for a while and twisted the facts. This came back to me as this is a small profession. I was quite hurt, as really, they were the ones who were unethical by bad mouthing me after they had told me not to go given that they could find someone else (which they did), and they knew I was eventually going to leave.
However, this did not prevent me from publishing and getting tenure. On the other hand, if I had gone to the first place away from wife and having to cross-country commute, I am quite sure I would not have had the time and peace of mind to get research done fast enough to get tenure. Staying in the first school would have been the end of my academic career.