There probably isn't a good way for a political party to lose a member of its parliamentary group, but there are very bad ways and less bad ways. The worst is either (depending on your point of view) straight defection to another party or a resignation forced by a criminal charge or conviction. The next worst is a resignation caused by an internal party squabble, à la Margo MacDonald or Dennis Canavan. MSPs who resign on a specific matter of conscience, but who remain on good terms with their former party leadership and pledge to remain supportive on most parliamentary votes, is the least worst of all. Indeed, it reminds the public of the strong principles that attracted people to the SNP in the first place - this isn't a party of careerists or narrow nationalists, but of idealists who see independence as a vehicle for a better nation and a better world. Additionally, to the extent that the electorate stand to be reassured by the change in policy on NATO, this underscores for them that the shift is not cosmetic, but is genuine and has had consequences.
Nevertheless, the departure of John Finnie and Jean Urquhart is still highly regrettable, and I can't help but feel that the leadership have to take a share of the blame. Loyalty and the maintenance of unity isn't a one-way street. Before indicating their desire for a change in policy, did the leadership take steps to ascertain whether resignations were likely? That should certainly have been a factor in their thinking - there may be some (small) tactical advantage in being seen to be more in step with public opinion on NATO, but there's also a tactical advantage in a party remaining united. A natural majority clearly exists within the SNP for leaving NATO (the narrowness of the vote suggests that it was swung by delegates who didn't want to embarrass the leadership), and the most appropriate way to maintain unity is to ensure that the majority voice is respected.
However, what's done is done. Let's hope the lessons have been learned, and that there are no further attempts to push the party membership further than they are prepared to go on their core principles - ie. no innocuous policy "updates" on reintroducing the tawse!
Lastly, I don't want to say I told you so, but I told you so. I suggested in May last year that the SNP ought to think twice about installing Tricia Marwick as Presiding Officer, because it would slightly increase the risk of them losing their overall majority at some point during the five-year parliament. Eighteen months on, the majority is already down to two seats. It's unlikely to make much practical difference if the majority is eventually lost, but you can be sure that the symbolism would be gleefully seized upon by the unionist parties.