"In a nation of anarchy, nothing stops people from robbing, raping and murdering other people."
Humans are selfish by nature and wouldn't be providing defense for the greater good, they would be providing it because it would be in their own self interest to have a defense mechanism. People who know what they are doing, will provide defense (or anything else) if anyone wants to pay for it. If people want those things, they will pay for them. There is no need to force people to fund things at gunpoint, godfather style, "giving them an offer they can't refuse".