How to explain this prime gap bias around last digits? My question is related to this article by Oliver and Soundararajan (article about a bias in the distribution of the last digits of consecutive prime numbers).
After trying some python experimental researches on the prime gaps, I notice a bias in the gaps around each last digits {1,3,7,9}.
Could this bias be intrinsically linked to the bias found in the distribution of the last digits of consecutive prime numbers?
Experimental results
Here some experimental plot results up to the 3,500,000th prime number.
Two set-ups are calculated:
1. Cumulative and average gaps
2. Cumulative and occurence of particular gap size  

1. Cumulative and average gaps 


*

*1.1 Cumulative/average prime gaps after last digits:
 + Cumulative/average prime gaps before last digits


*

*1.2 Cumulative/average prime gaps before + after last digits


2. Cumulative and occurence of a particular gap size 


*

*2.1 Cumulative/occurence of gaps size of 10 after last digits

 - Animated cumulative/occurence per incremented gap sizes after last digits

3. Misc 


*

*3.1 Additional research on a waveform script of the sieve of Ératosthène,
colored by last digits:
 + plot 2

The script is on colab.research and is ready to fork
 A: Yes, it can be analyzed in the same way. Since the effects you're measuring are similar to each other, I'm only going to address the first one, cumulative prime gaps after primes with a fixed last digit. In Lemke Oliver and Soundararajan's paper, they count pairs of consecutive primes $p$ and $p_{\text{next}}$ up to $X$ satisfying $p \equiv a$ and $p_{\text{next}} \equiv b \pmod{10}$, or a sum of the form
$$\sum_{\substack{h > 0 \\ h \equiv b-a}} \#\{ p \le x : p \equiv a \pmod{10}, p_{\text{next}} - p = h\}.$$
This setting can be described by two variations to the above sum. First, by summing the prime gaps, each term is being weighted by $h$. Second, since it's all prime gaps after primes with a fixed last digit, the expression is also summed over possible choices of $b$.
Armed with these modifications their analysis should follow through very similarly. For example, the proof of Prop. 2.1 in their paper can be carried out, but instead of considering
$$F_{q,\chi}(s) = \sum_{h \ge 1} \frac{\chi(h)}{h^s} \mathfrak S_q(\{0,h\}),$$
weighing each term by a factor of $h$ means that instead we're considering $F_{q,\chi}(s-1)$. The poles of this function have shifted, so the corresponding sum for $S_0(q,0;H)$ in the statement of Prop. 2.1 would have a leading term of linear size in $H$, rather than log size.
As Lucia commented, the bias seems to be on a smaller scale than the bias from the paper. This reduction in bias should be a result of summing over all values of $b$, which has some averaging effect. As a test of this, we can consider the Main Conjecture on page 2 and sum the $\log \log x /\log x$ term over all values of $b$ with fixed $a$; the result is that it disappears entirely, leaving the $1/\log x$ term.
Another crude experiment can be done by taking the data on page 2 of their paper, assuming that the gap is larger than zero but otherwise as small as possible, and computing what the corresponding sum would be in this case. For $a = 1$, this would be the sum $$10 \cdot \pi(x_0;10,(1,1)) + 2 \cdot \pi(x_0;10,(1,3)) + 6 \cdot \pi(x_0;10,(1,7)) + 8 \cdot \pi(x_0;10,(1,9)).$$ To compare to your data, one can take this a step further by treating the total of these sums as a ``total prime gap'' and taking the percentage of the total for each. The result of doing this with the values from page 2 is:
\begin{array}{c|cc}
a & \text{Sum} & \text{Percent of total} \\
\hline
1 & 149655728 & 25.96 \\
3 & 165705632 & 28.75 \\
7 & 125284384 & 21.73 \\
9 & 135805698 & 23.56 \\
\end{array}
A huge limitation here is that these sums are heavily influenced by the chance that numbers coming immediately after $a$ have of being prime (in particular, they are in increasing order beginning at 5 mod 10). Lemke Oliver and Soundararajan explicitly address this effect, showing that it doesn't account for the full bias. And, in fact, this doesn't quite match the data that you have. Nevertheless, some discrepancy is visible even in this crude model.
