Why would classical correlation in Bell's experiment be a linear function of angle? Sorry if it's a newbie question, but I have trouble understanding the following part in the Wikipedia's explanation for the Bell's theorem:

With the measurements oriented at intermediate angles between these basic cases, the existence of local hidden variables could agree with a linear dependence of the correlation in the angle but, according to Bell's inequality (see below), could not agree with the dependence predicted by quantum mechanical theory, namely, that the correlation is the negative cosine of the angle. Experimental results match the curve predicted by quantum mechanics.

Accompanied with the following plot showing corellation as a function of angle:

But, the thing that troubles me is that I can't find the proof to that reasoning. A projection of a line onto an axis is the cosine of its angle, right?
To clarify, if I slightly modify the image from that article, let's say you measure particles A and B using parallel detectors:

The results are perfectly correlated (well, anti-corellated, but that's due to spins being different), as expected.
Now, if you deflect the B measurement device slightly ($\pi/8$, since that's where the "large classical error" happens), we can represent it like this:

As a complete newb, my knee-jerk reaction would be that detector B would detect a projection of $cos(\pi/8)$ length, compared to the detector B, as shown in the detail:

Why does the classical theory predict linear correlation, then?
 A: I think you misunderstood the significance of could for a classical theory. The text below the picture you took from Wikipedia says: "Many other possibilities exist for the classical correlation subject to these side conditions", so classicality does not imply linearity. It does, however, rule out the cosine, by the following (slightly heuristic) argument:
Classical means heuristically "all measurement results exist, whether there is measurement or not".
Take a polarizer at an angle $\theta$. Classical/local hidden theories insist that the probabilities $P(A_\theta = A_\phi)$ that the photon that passed through at angle $\theta$ would have passed through at an angle $\phi$ through the same polarizer exist all at the same time. Note that it is important that this is the probability to detect the quantum particle - if we were just talking about continuous field strength, as your projection argument would imply, the following probabilistic argument would not work. It is, however, experimentally shown that you indeed measure single incident photons.
Now, a basic probabilistic law says that
$$ P(x = z) \ge P(x = y) + P(y = z) - 1$$
If we now divide $[\theta_0,\theta_N]$ into $N$ equally big intervals of length $\Delta\theta = \frac{\theta_N - \theta_0}{N}$ with angles $\theta_0,\dots,\theta_{N+1}$, we get:
$$ P(A_{\theta_0} = A_{\theta_N}) \ge \sum_{i = 0}^N P(A_{\theta_i} = A_{\theta_{i+1}}) - N$$
But the cosine probability $P(A_{\theta_i} = A_{\theta_{i+1}})$ does not depend on the absolute value of these angles, so every summand is $P(A_0 = A_{\Delta\theta}) = \mathrm{cos}^2(\Delta\theta)$ and we have that a local hidden theory demands:
$$ \mathrm{cos}^2(\theta_0 - \theta_N)  \ge (N + 1)\mathrm{cos}^2(\Delta\theta) - N$$
Take a total angle difference of $\theta_0 - \theta_N = 90°$ and $N = 89$, and you get that 
$$ 0 \ge 90\mathrm{cos}^2(1°) - 89$$
which anyone with a calculator can prove false. Therefore, the assumption that all $P(A_{\theta_i} = A_{\theta_{i+1}})$ exist without making the measurement is false, since the cosine is what we measure.
A: Bell's argument makes very weak assumptions about the behavior of the two particles (which is why it's interesting). In effect, the particles are black boxes that take an angle as input and produce a spin direction as output. There is no restriction on how they choose the spin direction; there could be a source of true randomness in there, or a human being who makes the decision. The only limitations are that neither box is told what angle was given to the other box, and if both boxes are given the same angle, they must return opposite results.
Each box could have a secret "real spin axis" in it (pointing opposite to the other box's axis) and upon being told the measurement axis it could compute the $\cos^2$ of the angle between those axes. However, it can't return that as the result, because the result has to be either "up" or "down". It could return "up" with probability equal to the cosine squared, and "down" otherwise. But then if both boxes were given the same measurement axis, but it was not the "real" axis, there would be a nonzero probability that they would return the same answer, which violates the requirement that they always return opposite answers in that case.
If you think about it, there is no alternative but to pre-decide the result each box will produce for each angle, since there is no other way to ensure they will always match. So "measurement results are predetermined" is not an assumption of the theorem, it is just the only apparent way to comply with the requirements given some seemingly self-evident assumptions about reality.
Bell proved an over-general result that is unnecessarily hard to understand. You don't need a continuum of measurement angles to get a nonclassical result, just three. With three angles, the argument above shows that there are only $2^3=8$ possible "answer strategies" for the boxes, which we can write UUU, UUD, UDU, ..., DDD (where U means the first box says "up" and the second "down", and D is the reverse). Two of those, UUU and DDD, lead to the boxes always disagreeing. The other six are all equivalent under permutations and exchange of U and D, and they lead to the boxes agreeing 2/3 of the time when the angles are different. So 2/3 agreement is the highest possible in a classical world. But in a quantum world, measuring Bell-pair electrons along axes of 0°, 120° and 240° gives agreement 3/4 of the time.
A: OP, here are the justifications for the cos^2 θ and linear parts of your correlation vs angle graphic:
In the quantum case, the “first” detection (using “first” for illustration even though the detections and determinations of polarization state at both detectors happen theoretically at the same time) sets the basis for both detections and the zero angle, so P(coincidence) = cos^2 θ is the probability that the second detection matches the first, ie, the two results are correlated.
In the (real numbered) classical case, the polarization and thus the basis, are set at the entanglement source, and there is no influence between the detectors, so the detections just happen randomly and independently. The detector angles are uniformly random 0-2π, and the incoming polarizations are uniformly random 0-2π, so the coincidences (ie, correlations) are uniformly distributed around the circle, thus correlation is a linear function of relative angle.
However, also consider this:
ACuriousMind gives a correct argument, but there is one big issue with all Bell arguments: there is a built-in assumption that local real hidden variables (and in fact all classical values) are real numbers. But what if all realizable physical property values are more like distributions (think something like fuzzy numbers, or “unsharp” values) instead of infinitely precise real numbers (ie, mathematical points)? The initial "basic probabilistic law" ACuriousMind starts with, and the Bell theorem depends on, is no longer a valid inequality. This means the only thing Bell tests prove is that hidden variables cannot be real numbers. To which I would respond: Duh!, real numbers strictly are not realizable in the real world. Real-numbered property values would represent zero entropy states (ie, true delta functions), violating the third law of thermodynamics, and would also violate the Bekenstein information bound, so they cannot physically exist. If realizable property values look more like Gaussian distributions of value, these could match the cos or cos^2 correlations (which one depends on the specific setup) obtained in real Bell tests very closely, and would be determined at the entanglement source. Locality would be preserved and Einstein would be right.
This part of the response is consistent with Paul Busch’s notions of “unsharp quantum reality,” as described here https://arxiv.org/abs/1005.0604. Busch explains that quantum values like polarization and spin are, in physical reality, unsharp, or indefinite. And if they are “unsharp enough”, Bell inequality violations should be expected without quantum effects like non-locality.
