A witness who disobeys a court order has automatically broken the law. Indeed, this is the most fundamental of laws; you can't decide "If I turn up to the hearing I may be punished for my crime; but not attending isn't against the law, so goodbye."
A witness who goes out of the jurisdiction cannot, of course, be punished while there (though when he returns he may have to explain why he chose to leave having been warned that he must attend or face penalties- that is the meaning of sub poena). But your assumption that anybody who fails to attend probably had a good reason betrays a fundamental, though common, misunderstanding. A court has determined that your evidence is necessary for justice to be done. There is therefore no good reason not to attend. It may well be that a doctor would prefer that you did not go to court that day, and if you apply to the court it may be possible to find some arrangement. But you are not allowed to decide 'my convenience is more important than discovering whether the defendant should go to jail or not". Civilised countries have people who are empowered to make that decision; they are called judges, and the decision has been made.