In this particular case, there are two huge problems with what McCain did.
The first is the most obvious: in choosing a Vice Presidential nominee, McCain is choosing someone who might well end up taking over as President. This would be true for anyone, but it’s especially true in McCain’s case, since he is a 72 year old cancer survivor. Anyone who “puts country first”, as McCain is fond of telling us he does, would have taken care to ensure that that person was up to the job, and had no unpleasant secrets like, oh, past membership in a fringe secessionist organization. Not bothering to do the most basic due diligence before naming her as his running mate is staggeringly irresponsible.
The second is that McCain was willing to take a huge gamble not just with our country, but with his own political interests. As I said earlier, gambling with the country is worse, but gambling with your own interests is a different kind of bad judgment, and worth noting in its own right. If you are selfish enough to put your own interests above the interests of your country, that’s awful. But it doesn’t move you into the realm of the wholly unpredictable, the people from whom you truly never know what to expect. (It’s like being one of those dictators who are nonetheless rational enough that things like deterrence can work with them: you are bad, but bad in a way that makes it possible to anticipate what you might do next.)
Being willing to take a huge and reckless gamble with your own interests is not like that. It’s not cool and collected selfishness that leaves room for some hope that if your interests and the interests of your country align, you might end up doing the right thing for the wrong reasons. It’s sheer impulsive stupidity: an unwillingness to think, in even the most basic ways, before you act. That’s a terrible trait in a President.