Let 'PSR' stand for the principle that whatever is, but need not be, has an explanation for its being.
(PSR) Whatever obtains, but doesn't obtain of necessity, has an explanation for its obtaining.
Equivalently: Every contingent state of affairs has an explanation.
One might think that PSR has both a priori and empirical support. Regarding the a priori, when we consider an arbitrary state of affairs that obtains but doesn't have to obtain, we feel motivated to wonder why it obtains; and that wonder seems to reveal an inclination in us to think there ought to be an explanation.
As for empirical support, PSR is a simple (the simplest?) explanation of all the cases of explanation anyone has encountered.
The support is defeated, however, if there are counter-examples to PSR. And, my sense is that most philosophers these days think or suspect or worry that there are counter-examples.
Perhaps the most commonly cited counter-examples are these: (1) quantum events, and (2) the Biggest Contingent Fact. It turns out to be difficult, however, to get these counter-examples to stick, as I'll attempt to explain. I'll focus more on (2), since I take it to be the more serious candidate.
First, quantum events. Suppose the link between a complete physical state A and a physical state B is indeterministic. Then we have a violation of PSR only if each of the following are true:
1. The indeterminicy in question is ontological (no hidden variables).
2. There is no non-physical state that, together with A, explains B.
3. There is no indeterministic explanation between A and B.
4. There is no deterministic explanation between tokens of types A and B, despite an indeterminacy at the level of types.
Much could be said about (1) - (4). But here I wish merely to propose that we are not in a position to see that quantum events lack an explanation unless we are in a position to rule out each of (1) - (4). Perhaps there are good reasons to doubt each of (1) - (4), but the task of identifying them is surely not an easy one. (I'm not aware that it's even been attempted, since I've never seen (4) addressed.)
Let's turn now to the Biggest Contingent Fact, or 'B', for short. B is a contingent fact that entails (or includes) all other contingent facts.
Here's an outline of a standard reason to think that B is a counterexample to PSR:
1. If PSR is true, then B has an explanation.
2. Whatever explains B is either contingent (non-necessary) or necessary.
3. B cannot be explained by something contingent (else circularity).
4. B cannot be explained by something necessary (else B would be necessary).
5. Therefore, B cannot have an explanation. (2,3,4)
6. Therefore, PSR is not true. (1,5)
Consider, first, (3). The motivation for (3) is that you seemingly cannot have circular explanations; for example, no chicken can make itself. Why think a contingent explanation of B would be circular? Presumably because any such explanation would be wholly included in B.
The inference is too quick, however. It could be that the explanation of B is partly contingent and partly necessary, such that the contingent part of the explanation is itself ultimately explained by the necessary part. In that case, there's no circularity (no fact explains itself). Here's an illustration. Suppose N is a necessary fact, C1 and C2 are contingent facts, N explains C1, and C1 explains C2. What explains N and C1 and C2? Here's an answer that avoids circularity: N and C1, which is itself explained by N (or by N's explaining C1). (This is an example of a fact being explained by a fact it includes, where no circularity results.)
Of course, the above scenario requires that it be possible for a contingent fact to be explained by a necessary fact. That is, it requires the possibility of non-entailing explanations. I'll discuss this possibility when discussing (4) next.
Consider (4), then. Perhaps the simplest way to motivate (4) is to suppose that every explanation entails it's explanandum. But why think that? It's worth pointing out here that I've not said anything about the kind of an explanation that PSR calls for. Leibniz says the reason/explanation is "sufficient". But "sufficient" need not mean logically sufficient (entailing). It could mean adequate, or "satisfying" to those who wondered "why". Rather than debate over words, let us place no restrictions on the sort of explanation in view.
We normally cite explanations that do not entail their explanandum: for example, I wonder why my son is crying, and I learn it's because he wanted to eat ice cream for breakfast but wasn't allowed. Of course, it could be that there are implicit additional facts, such that the cited explanation together with those additional facts would entail the explanandum. But why think that's actually the case in every case? I propose that filling in the argument here won't be easy (though I won't say it can't be done).
But even if you are convinced that explanations must entail their explanadum, we can work instead with partial explanations. Surely a partial explanation need not entail the thing it merely partially explains. So, when I say 'explanation', realize that I mean to include mere partial explanations. (Perhaps we should call the principle, 'PPR', the principle of at least partial explanation.)
We might try to motivate (4) by motivating the more specific claim that no necessary fact can explain a contingent fact. But there's a reason to doubt that claim. The reason is that the necessary fact that a necessarily existing thing wants to create a world with feature phi, is able to do so, and sees that our world would have feature phi would seem to count as a fine explanation of the contingent fact that a necessary being creates our world.
I suggest, then, that (4) is in need of argument, and that it's not easy to see how to successfully argue for (4). Furthermore, (3) is need of an argument, since it's not clear that circularity results from its denial. So, it's not just easy to see that the Biggest Contingent Fact poses a problem for PSR.
Perhaps a better way to argue that B is a counterexample to PSR is to invite candidate explanations of B and show that they fail in one way or another. Here's a candidate explanation that's as good as any: B is explained by the fact C that a necessary being choose to bring about certain contingent facts that themselves began a chain of explanations of the rest of the facts that comprise B. But now consider what might explain C? Suppose this: the necessary fact N that a necessary being wanted to bring about a world with feature phi, was able to do so, and saw that bringing about C would be a good way to do so. The problem now is that the fact that N explains C is itself contingent and so needs an explanation, yet whatever explanation we give will imply a further contingent fact in need of an explanation, ad infinitum, and we'll have no explanation of this entire infinite chain, though it is contingent.
But I've got a reply. Why not suppose that N (together with any other relevant necessary truths) provides the ultimate ground, or explanation, of the entire infinite chain of explanations? If that were so, then N would explain (at least partially) each of the following (i) C, (ii) N explains C, (iii) N explains (N explains C), and so on. It's not clear that there's a problem here. So, it's not yet clear that the proposed explanation of B leads to problems.
At this point, someone might worry about the possibility of giving a contrastive explanation: why does N explain this chain rather than some other? But again, I'm placing no requirement on the kind of explanation to be given. Even if there's no contrastive explanation, we can still suppose that N's nature provides a (partial) explanation of its activities. That's not clearly problematic.
What I've said here is just an opener. There are other potential counter-examples to consider, and there may be better ways of arguing for the above candidates than the arguments I've considered.
What's become increasingly evident to me, however,--and this is the main point I wish to propose--is that identifying a counter-example to PSR (or to PPR) is no easy task. It might be easier just to believe PSR (or PPR), if indeed it seems evident to you.
I'll close by floating a hypothesis in support of PSR. The hypothesis is this: one's basis for thinking of any particular fact that it has an explanation is equally a basis for thinking that contingent facts, in general, have an explanation. Why do I suggest this? Well, suppose you discover milk on your floor. You do not think the milk appeared there with no explanation at all; you think there's an explanation of the mess. But why? What's your basis for thinking there's an explanation here? If PSR is true, then your basis could be this: you realize that the situation didn't have to obtain, and you instinctively see that whatever obtains, but need not obtain, has an explanation. But suppose that's not your basis. Then what is it? You might say that you've observed events similar to milk spilling that have an explanation. But in what way are they similar? There are infinitely many respects in which the members of the class of events you've observed to have an explanation are similar. Which respect is relevant here? If you say all the situations anyone has observed to have an explanation had a beginning and that therefore the milky situation has an explanation on account of its having a beginning, then by the very same reasoning you could also say that all the situations anyone has observed to have an explanation are contingent and that therefore the milky situation has an explanation on account of its being contingent. And then you'd have a basis for PSR. I confess that I don't see what basis one might have for thinking that spilled milk has an explanation if one doesn't have an equally good basis for accepting PSR--unless one has good reasons to think there are counterexamples to PSR.