It is absolutely kept and sold by Apple and Samsung. And other vendors too, like Walmart and Target, just to name a few.
It is a BIG business. Data. Used for marketing.
However, without the information about who owns that phone with a specific MAC address (GPS Coordinates, Date/Time, and MAC Address are the bare minimum of useful data) the data is anonymized.
And to guard privacy, Apple, Samsung know who that smartphone with the specific Mac Address is, because they know who owns they phone...it is in a sales record somewhere.
I make the assumption that entities that get it from an application such as Walmart or Target know full well who you are, because most people have to fill out some kind of user profile for the application, which they can easily marry up to the MAC Address. How private our data is with industry is wholly debateable. They don’t have any stricture that prevents them from selling that except their good word, crossed fingers, and a smile.
They don’t have a legal impediment such as HIPAA (for the Healthcare industry) so if they want to sell it...
However, for government to obtain your identity legally and be able to use it in a court of law, the government or law enforcement agency must submit a supoena issued by a judge to unmask a MAC Address. They would generally submit that to Apple or Samsung, who have happily complied in the past.
So yes, the anonymized GPS data is sold for gazillions of reason for millions of dollars. It is a serious privacy hole, IMO.
It is possible that while Walmart and Target DO know who you are if they could marry your profile information to the MAC Address, I readily admit I cannot say with certainty that they can do that. It could be that Apple or Samsung only know that information, and they guard it (who the MAC Address belongs to) and Walmart and Target know who you are as a person, but not your MAC address. This nuance is something I don’t know about.
But Apple and Samsung DEFINITELY know who you are, even if the phone was not sold by Apple directly but by a third party like Amazon or Verizon.
Let me be more specific.
Apple does not sell data generated by apps that -they- make such as any Apple IOS app like Maps, Find My, Home, etc.