Another protection embedded in the system comes again from the miners' economic resources at stake. As we said, mining blocks and calculating Proof-of-Work consumes a lot of resources. If any miners decide to try to attack and take control of the network for their own benefit, this would be a very risky and expensive strategy. It would require an immense amount of computing power in order to succeed. We already mentioned the gigantic amount of hash power plugged in the Bitcoin network, so this is what any delinquent miners need to compete with, in order to tamper with the distributed ledger.
The more blocks are built on top of a given block, the more confirmations it has, and the harder it is to be manipulated. If any miners want to change a previous block, in order to create double-spent transactions, divert funds, or for any other reason, they would then need to re-mine all subsequent blocks. Moreover, all this work would be done basically for free, as they wouldn't earn any meaningful rewards on re-mined blocks. This is the case because their alternative chain would be competing with the original chain to become the longest and main chain of blocks. If not the longest, it would be ignored by the network, and no other miners would validate it by working on extending it.
Remember, miners always start building their new blocks on top of the longest existing chain, which contains the most cumulative Proof-of-Work done since the genesis block, the first block ever created. In this way, by linking each block to its parent block through hashes that contain all the block information, the entire network validates and confirms each and every transaction ever made on the blockchain. Every 10 minutes, when a new block is added to the blockchain, all transactions, right to the first one Satoshi made when he created Bitcoin, are re-validated and re-confirmed by the entire network.
Consider also that, while non-compliant nodes are re-mining past blocks, all the other honest nodes keep mining on and extending the original main blockchain. Therefore, the non-compliant nodes need to keep mining, at a faster rate than all the rest of the network, deploying more processing power and consuming more electricity, without any meaningful compensation.
The further back in time such an attack on the blockchain occurs, the lower the chance is that it would be feasible. And we are not talking years here, and not even months. We are talking weeks and days. There are 144 block confirmations in 24 hours. As we already mentioned, 100 block confirmations are required by the Bitcoin protocol for block reward coins to become spendable, so this is considered long enough to mitigate the risk of potential conflicts of interest for miners.
That's why it is so hard for an attacker to manipulate or take control over the Bitcoin blockchain. Now that the network has been live and up and running for almost a decade, the computing power plugged in mining, supporting the blockchain, and following the rules of the protocol, is enormous. This architecture probably makes it much more robust than any other payment network infrastructure that has ever existed.