It falls out naturally from game theory and the increasing population and complexity of society. Model these sort of interactions as multi-party sometimes-repeated Prisoner's Dilemmas. Everybody is better off if society functions in a high-trust way: you don't need to spend expensive resources ensuring compliance, and yet nobody takes unfair advantage of other parties. However,
if somebody is going to defect and take the pot unfairly anyway, it's better that it's you, because otherwise you don't get to play another round. Under these scenarios it makes sense to cooperate if you have reasonable confidence that nobody else is going to defect.
How do you get reasonable confidence? Well, one way is to simply have a small number of other players and play with them repeatedly. If you have 4-5 competitors, it's a pretty good bet that you will know who all of them are, and you can shut them out of further deals if they screw you over. Everybody knows this condition, and so they cooperate to preserve future payouts rather than defect to take the pot now. But if you have a million competitors, you know somebody is going to defect, just through sheer numbers. And knowing this, your incentive is to have it be you, because the pot will disappear, there will be no future interactions, and there's hence there's a higher payoff to defecting than cooperating.
Same dynamic plays out in markets over and over again. If you have an oligopoly, you can cooperate on things like holding wages down or copying competitors' moves. If you're an unskilled laborer, you know somebody else is going to come in and underbid you, so all you can bargain for is subsistence wages. If you're buying a house and are the only buyer, you can name your price. If there are 4-6 other offers, you can afford to offer a "reasonable" price (similar to comps) and have a reasonable expectation nobody else will offer better. If you've got 13 other offers, you better bring everything you got because somebody else will.
The phenomena is usually self-limiting, because the act of defecting usually destroys the trade pathways that led to the transaction becoming possible in the first place. If the Internet becomes filled with scammers, nobody will do business on the Internet. If all your mail is junk solicitations, you'll throw it all in the trash immediately. If the roads are filled with bandits and criminals, nobody will be able to haul goods to market. If war starts, productive capacity will be destroyed. And then little pockets of high-trust areas arise from people just trying to get things done in the post-collapse landscape, they become more successful than the low-trust wasteland surrounding them, their communications & commerce systems spread, and the cycle repeats.
But this is why we can't have nice things.