There’s lot of history here, some of it debatable, but the general story is…
Early film developing used a sample photo of a white brunette as the standard for white balance.
Some time later, ad agencies complained to Kodak that photos of chocolates and dark woods weren’t quite right.
Kodak made some tweaks. And/or photographers learned to deal with it (both for product photos and people).
Digital cameras appear. Similar mistakes/oversights made by industry.
Now Google and others claim their cameras can do dark skin.
But, by the time we got to Google and Apple? The problems with photographing dark subjects would have been well understood. It's sad that it took being "outed" in the media for those companies to actively address the issue.
What I don't know is how much of the issue was "new" (re-introduced by the software behind the phone camera magic) or "existing" (the same problem with color/white balance that has existed since the dawn of photography). If it was "new", that's rather damning, IMO, since the problem space was known, and the product people chose to ignore it. Put another way - some of this is just physics, but how much was physics and how much was software ignoring one set of subjects in an effort to improve outcomes for another?
But, no, probably not intentionally spiteful. Just some combination of lazy, greedy, and ignorant.
In other words, very standard human behaviour, irrespective of any racial considerations.