They were erected and expected to produce their own mini-city and mini-community, which they did faithfully for some years as they filled a niche that is otherwise unavailable to suburbanites.
That's dead on. All of the other things that malls were "supposed to be" were marketing and to the extent that they occurred, existed to feed the "mini-city/mini-community" which were the rent-payers who were there to sell their goods to the largest audience they could have available to them given the technology of the day.
They were the non-Internet world's answer to Amazon with a lot of the same problems. We drove 15 miles to the mall a few times a year for holiday/general shopping -- it was the only "hope" for handling Christmas in one trip (on the 24th of December where you could lift your feet off the ground and have the people all around you carry you to each store). Plus a nice play area where Dad could fall asleep while the kids beat each-other up and mom had time to get all of the shopping done[0]
I live next to two malls. One is an 80s, still-alive-but-barely, mall that will likely be on this site at some point. The other is a brand-new, outdoor mall with a variety of non-commercial attractions (live bands spring-fall Fri-Sun, a mini-splash pad for the kids and a larger play area). If I couldn't walk to the nice mall[1], I wouldn't visit either. Neither of them have any stores I'm interested in -- I've probably spent a total of $50 there in the 7 years since it's been around. It's hard enough to find things online with a search bar, let alone walking through miles of stores who don't make enough money to employ the staff required to provide the service that warrants the higher cost.
[0] Yes, that's an intentional exaggeration of gender roles for the purpose of being silly, not offending; my parents were nothing like this.
[1] When I moved here, it was a lousy par-3 golf course. This is a little more fun to walk to, and it's really neat listening to (some incredible) local bands for free, but a lot less fun to live next to at Christmas.