A Mathematical Coincidence, or more?

Solution 1:

That is known as a "Borwein Integral", named after one of the authors of the paper you linked.

http://en.wikipedia.org/wiki/Borwein_integral

Wikipedia has some references which explain what is going on. Here is one of them.

http://schmid-werren.ch/hanspeter/publications/2014elemath.pdf

I would have left this as a comment but this site requires 50 reputation for that.

Solution 2:

This is not a complete answer, but I followed their advice "see [16, chap. 2] for additional details" (that's the book Experimentation in Mathematics). In section 2.5.2 they show that the cosine product (without the factor $\cos 2x$) equals $\prod_{k=0}^{\infty} \operatorname{sinc}\left(\frac{2x}{2k+1}\right)$, whose integral can be computed using the Fourier transform, giving an answer $\pi_1$ which is a bit less than $\pi/4$.

(Ultimately, this is because the Fourier transform of the sinc function is the characteristic function of a symmetric interval around the origin, and if you take the convolution product of several such functions, it will "gnaw" its way into the origin if you have sufficiently many factors with sufficiently big intervals, making the value there less than $1$. See page 22 in the paper, and this answer on MO; don't miss the comments!).

For the integral $\pi_2$ (with the factor $\cos 2x$), they don't give any details (it's just an exercise on page 124 to prove that $\pi_2 < \pi/8$), but I presume it's pretty similar. To see just why the deviation from $\pi/8$ becomes so very tiny, one would have to work out exactly what the corresponding sinc product is in that case. Perhaps if you wait a while, someone will do it and give a fuller answer here.