What is the logic behind the pin diagram of Ethernet cables?

Solution 1:

From Wikipedia, emphasis mine:

Cables terminated in registered jack connectors used in building wiring and the telephone network normally consist of twisted pairs of wires. Wiring conventions were designed to take full advantage of the physical compatibility, thereby ensuring that using a smaller plug in a larger socket would pick up complete pairs, not a (relatively useless) two half pairs. But here again, there has been a problem.

The original concept was that the centre two pins would be one pair, the next two out the second pair, and so on until the outer pins of an eight-pin connector would be the fourth twisted pair. Additionally, signal shielding was optimized by alternating the live (hot) and earthy (ground) pins of each pair. This standard for the eight-pin connector is the USOC-defined pinout, but the outermost pair are then too far apart to meet the electrical requirements of high-speed LAN protocols.

Two variations known as T568A and T568B overcome this by using adjacent pairs of the outer four pins for the third and fourth pairs. [...]

So, the center pins 4 and 5, and their neighbours 3 and 6, follow the original conventions. But pins 2 and 7, and 1 and 8, could not follow that conventions due to electrical requirements. Hence the other two pairs are wired to pins 1 and 2, and 7 and 8.

Also note that keeping twisted pairs together is important to limit crosstalk. And different pairs have different twist rates, so maybe interchanging pairs (like using brown for blue, and blue for brown, on both sides of the cabling) affects electrical characteristics too; I'd stick to the standard colour scheme.

Solution 2:

General answer:

The actual reason for placement of specific signals in a connector, the design of the connector itself (and the color coding for the wires) is most likely hidden inside the technical standard(s) related to the connector and cabling.

For TECHNICAL reasons, e.g. avoiding "crosstalk", it is wise to place wiring that has signals with sharp edges (e.g. square wave) separate from signals that might get disturbed by the "noise" caused by the sharp transitions from "low" to "high" state of that OR make sure to have some type of shielding in between.

Reference:
"twisted pair" cabling (e.g. two intertwined wires) and also "balanced pair" exist as these help to mitigate trouble with disturbance (as above, and other).

Note:
"cross over"-type cables might not be needed, many network devices detect the correct polarity and adjust automatically.