I am not a lawyer.
I can't talk about this case specifically for various legal reasons, but:
In general these bonds are exactly to pay for lost sales due to a preliminary injunction that wasn't deserved. The injunction does not even become effective until the bond is posted. The only case you wouldn't recover is if the injunction wasn't upheld but you lost the lawsuit anyway, and even then, it depends on what "lost" means. This should be rare, since injunctions take into account "likelihood of success on the merits".
Additionally, if you win, it doesn't even matter whether the injunction was deserved at the time, you can still recover on the bond because you were enjoined from doing something you had the right to be doing.
As for whether it matters if it was the judges fault or Apple's fault: For patent cases like this, there are no grounds for reversing a preliminary injunction except deciding it was an abuse of discretion (since that is the standard of review for this kind of injunction). So all reversals are because it was granted improperly by the judge.
I am a patent attorney.
So depending on how large that is, it can say a bit about how serious Apple is about this stuff (or how deep their pockets are, maybe)? For anybody who's curious, like I was, the bond amount was $95,637,141.60 (~$95.6 million) [1]. Is Samsung now entitled to get some of that because of the unjustified preliminary junction? Or only if they win?
[1] http://assets.sbnation.com/assets/1221082/show_temp.pdf