There is a vast difference between what is against the law and what is immoral. Morality is subjective and we all have a different code of morals. Personally, I think keeping the charger is immoral. Some others may not and it's not up to me to judge their moral code, even though to judge is human.
Walking into a store and taking something is against the law. It is stealing. Being given something for free due to a shopkeeper's mistake is not against the law. Not returning it, after realising the shopkeeper's mistake, can be seen as immoral by most people, but it is not against the law. If a shopkeeper gives you the incorrect change and it is less than he/she should have, that is against the law. But if the shopkeeper gives you more change than necessary and you don't take it back, then you're not breaking any laws.
The OP did not walk into an Apple store and take the charger without paying for it. He was sent an extra one due to a mistake. Apple can legally charge him for the extra charger, but it is up to Apple to prove that they sent two chargers instead of one. In the eyes of the law there isn't much a shopkeeper can do after realising their mistake of giving you too much change once you've walked out of the shop.
Having said all that though, I am sure that there is some county in the US where it is illegal for women to wear high-heels on a Tuesday, for men to wear a hat on a Monday and for a customer to not return the extra change he is given due to a shopkeeper's mistake, but as far as I understand it, the general law in the western world does not consider this a crime. Some religions on the other hand, like Judaism, do consider this as a crime, regardless of whether the shopkeeper is a Jew or not. But religious law and state law are two different things, hopefully, usually, not always.
Walking into a store and taking something is against the law. It is stealing. Being given something for free due to a shopkeeper's mistake is not against the law. Not returning it, after realising the shopkeeper's mistake, can be seen as immoral by most people, but it is not against the law. If a shopkeeper gives you the incorrect change and it is less than he/she should have, that is against the law. But if the shopkeeper gives you more change than necessary and you don't take it back, then you're not breaking any laws.
The OP did not walk into an Apple store and take the charger without paying for it. He was sent an extra one due to a mistake. Apple can legally charge him for the extra charger, but it is up to Apple to prove that they sent two chargers instead of one. In the eyes of the law there isn't much a shopkeeper can do after realising their mistake of giving you too much change once you've walked out of the shop.
Having said all that though, I am sure that there is some county in the US where it is illegal for women to wear high-heels on a Tuesday, for men to wear a hat on a Monday and for a customer to not return the extra change he is given due to a shopkeeper's mistake, but as far as I understand it, the general law in the western world does not consider this a crime. Some religions on the other hand, like Judaism, do consider this as a crime, regardless of whether the shopkeeper is a Jew or not. But religious law and state law are two different things, hopefully, usually, not always.