Apple could make a better cable, but it's not worth it to do so.
Whereas Anker has distinguished itself as a company that makes quality cables... by selling quality cables.
What's more likely is that the quality doesn't matter. Lots of people only care about the official apple brand, so apple can get away with selling an interior product for more money.
But here's the thing: Apple can't go selling premium cables and including cheapy ones in their phone boxes. The Apple brand has to be viewed as premium all the time, so they put a mediocre cable both in the box and sold on their website.
I'm pretty sure it's from heat damage from the power. Not mechanical strain. The heat slowly weakens the rubber material to the point of failure.
I am guessing usage patterns will explain the difference.
Not using the phone while charging negates this, as does having the cable flat on a table when using the macbook (as opposed to using and charging with the macbook on your lap, where the cable rops down immediately).
I like to open the one on my building, and have a peek to see if there's something interesting. I like repairing (often just resetting) discarded electronics and donating them to people who need them.
Anyway, I find loads of broken Apple cables, but very few plain USB cables.
Edit: I think a lot of people just naturally don't pay much attention to what they're doing to their cables. I used to work at a company where I was pretty much the only one whose MBP power cable wasn't visibly fraying at the ends, and I'm still using the same one 5 years later.
That said, I travel plenty, and I shove cables into my bag like anyone else. I can't think of a single cable for a single product (Apple or non-Apple) that I've destroyed. Some peoples' cables look like they get slammed in a car door twice a day every day.
This, combined with poor quality products explains the difference in my opinion.
The only cable that frayed on me was a MagSafe 2, next to the computer connector. The cable is ridiculously thin. It was the adapter for my 15 MBP. In comparison, I'm still using the original adapter of my 2008 MBP and apart from being scratched and dirty, it's still as good as new, cable and all.
What I think happens often is that the cable will be under some kind of rotational stress. I've noticed I have a tendency to always turn the phone the same way, so the cable has a tendency to turn around its axis. It's something I see especially often on corded office phones. Also, cables are often at very tight angles close to the connector, so there beign next to no relief ends up tearing the housing.
I've also seen many people pull on the cable instead of the connector to uplug it. That can't be to good for longevity either.
this is me and i replace these regularly
I have heard somewhere post iPhone 8 there is a "updated" version of Lightning Cable that is suppose to be more durable. But I have no way to fact check this.
Then again, i use my cables for charging, and i never use my devices while charging, so the bending/pulling that destroys most cables never occurs with mine.
One thing that does destroy cables though is a 2 year old kid with a fetish for sucking on the lightning end of the cables. My youngest kid did that for 6 months or so, and every cable he sucked on has a visibly corroded 3rd pin.