Union of random intervals with total length equal to infinity

$\newcommand{\ep}{\varepsilon}$

Without loss of generality (wlog), $a_1\ge a_2\ge\cdots$ and $a_n\to0$ as $n\to\infty$. Then a sufficient condition for $P(I=S^1)=1$ is that for some real $k>3/4$ and all large enough $n$ we have $a_n\ge\frac kn\,\ln n$. Indeed, take any real $\ep\in(0,1/2)$ and let
\begin{equation} n_\ep:=\max\{n\colon a_n>3\ep/2\}, \end{equation} so that \begin{equation} n_\ep\ge\frac{2k-o(1)}{3\ep}\,\ln\frac1\ep; \end{equation} all the limits here are taken for $\ep\downarrow0$.

Take any interval $J$ of length $\ep$, centered at some point $x$. Then \begin{equation} P(J\not\subseteq I)\le P(d(X_j,x)\ge\ep\ \forall j\le n_\ep) =(1-2\ep)^{n_\ep}, \end{equation} where $X_j$ is the center of the random interval $I_j$ and $d(X_j,x)$ is the distance from $X_j$ to $x$. Let now $J_1,\dots,J_{m_\ep}$ be intervals of length $\ep$ each such that $J_1\cup\dots\cup J_{m_\ep}=S^1$; wlog, $m_\ep\sim1/\ep$. Thus, \begin{multline} P(I\ne S_1)\le\sum_{i=1}^{m_\ep} P(J_i\not\subseteq I)\le m_\ep(1-2\ep)^{n_\ep} \le m_\ep e^{-2\ep n_\ep} \\ \le\frac{1+o(1)}\ep\,\exp\Big\{-\frac{4k}{3+o(1)}\,\ln\frac1\ep\Big\}\to0, \end{multline} so that $P(I\ne S_1)=0$, as claimed.


This is a refinement of Iosif Pinelis's answer, so we shall be somewhat brief. For a punchline, jump to the "Added" section below.

We claim that if $a_n>c/n$ holds some $c>1$ and for all $n\geq n_0$, then $P(I=S^1)=1$. To see this, fix a large integer $N$ and any interval $J$ of length $1/N$. Then, $$P(J\not\subseteq I)\leq\prod_{n_0\leq n<cN}\left(1-\left(\frac{c}{n}-\frac{1}{N}\right)\right)<\exp\left(\sum_{n_0\leq n<cN}\left(\frac{1}{N}-\frac{c}{n}\right)\right)=O_c(N^{-c}).$$ As $S^1$ is a union of $N$ intervals of length $1/N$, $$P(I\neq S^1)=O_c(N^{1-c}).$$ The right hand side tends to zero as $N\to\infty$, hence $P(I\neq S^1)=0$ as claimed.

Added. Using Google I found out that Shepp (1971) aswered the question completely (see here). In particular, $P(I=S^1)=1$ holds when $a_n\geq 1/n$ for all $n\geq n_0$.