This occurred in my shul a few days ago:
A person came to shul and there were 8 people. He was asked to stay a few minutes as within 5 minutes, 2 more people would certainly come and there would be a minyan. The person was impatient and said that if they began later, he would miss his train to work, so he left. As a result, when the 2 people came, there were only 9 people in total, and this ruined things for the others that were already there. (An elderly person who got up early to say Kaddish was livid, as it was a huge effort for him to come to shul, and he did so specifically to say Kaddish.)
My question - halachically, is someone allowed to leave forming the minyan because he must get to work, and by doing so, cause others not to have a minyan at all?
In your answer, you may address not only the issue of forming miyan / tefillah betzibbur but, if relevant, the inconvenience caused to others (e.g. the elderly person as well as others who were there on time / early) to form the minyan. (E.g. perhaps a problem of harming someone's feelings; causing "loss" - that elderly person might have gone to another shul that had a minyan so that he could say Kaddish.) If it matters, I should mention that the person who left was a "regular" minyan attender, i.e., those that came on time expected him to appear and stay for the minyan.