People used to go to malls $SPG $WPG to show of status. Their haircut, fashion item, gym body, popular boyfriend, etc. I'd argue this was their primary function.

People go to malls less now, not because of ecommerce like $AMZN, but because of social media like instagram $FB.