Graham's law', known as Graham's law of effusion, was formulated by Scottish physical chemist Thomas Graham in 1848. Graham found experimentally that the rate of effusion of a gas is inversely proportional to the square root of the mass of its particles.At the time Graham did his work, the concept of molecular weight was being established, in large part through measurements of gases. Italian physicist Amedeo Avogadro had suggested in 1811 that equal volumes of different gases contain equal numbers of molecules. Thus, the relative molecular weights of two gases are equal to the ratio of weights of equal volumes of the gases. Avogadro's insight together with other studies of gas behaviour provided a basis for later theoretical work by Scottish physicist James Clerk Maxwell to explain the properties of gases as collections of small particles moving through largely empty space. As matter and energy cannot be created or destroyed, and are merely forms of the other, perhaps we can say a rook will radiate its energy through largely empty space.
Obscure rule, or bug?

Although I think the laser theory is satisfactory, one might also consider the wavefunction superposition of the rook which would certainly enable it to block check while simultaneously preventing the castling move. This quantum mechanical approach offers possibilities of a more general theory of chess pieces, explaining such moves as the curious en passant phenomenon. However, it should be said philosophically that chess masters do not play dice.

You're right, we all have to live with this rule, and yet for some reason you are the only one crying about it right now. Well, if you're not interested in having any sense of humor whatsoever, suck up the tears and move on with your life like a grown ass man.
I believe (correct me if I'm wrong) that in olden times, castling was done manually, and the game ended with the capture of the king. The same reason we allow en passant is why the king can't castle through check - in the original game, he would have been captured.
That's also why pinned pieces can still block off squares from the king. The pinned rook in your example would capture just before the pinning bishop, so the white king would no longer be alive to give orders to the bishop, who would stand there like a doofus.
Combining these two rules brings us to your situation. Modern castling is shorthand for manual castling, to make the game go faster and not tear up your pawns as much. So what would actually be happening is,
White king to d1,
Black rook takes on d1,
White bishop displays amazing lack of initiative.
It's all very logical, when you think of the objective as 'to kill the king'.
It is a long-established part of chess, dating to at least the early 1800's, that the pieces can shoot lasers and prevent the king from moving, even if the piece can't legally move.
That rule dates back to the days when they used sharks with lasers on their heads instead of rooks.
Don't forget about the snakes.