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

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.