What other function would it serve in a retail area? I suppose you could argue that its direct purpose is to allow people who do not live within walking distance to visit and spend time. But unless local businesses profit from that visiting, they're not going to be in business for long and there won't be any reason for people to go there.
30 years ago we could say the purpose is simply to "exist in the public space of my community", but the demand for constantly increasing revenue from any and all space has effectively destroyed that.
You’re joking right? We’ve never had parking just because. It’s always been there to serve the needs of whatever it’s next to. In the case of retail, it’s to support the shops, period.
We’ve had mechanically metered parking since the 1940s, and manually paid for parking before that. Something has to pay for all that concrete.
It’s not like parking is this beautiful stuff you’d like to have around, eh? Of course parking serves the purpose of whatever it’s next to.