I have been diving for 50 years now and have always done it on a budget. If I can get something used that saves me some cash I get it used. I viz my own tanks, rebuild my own gear and usually can get all my fills for free. I rarely ever buy anything at a dive shop. That is because I had other priorities like a mortgage and kids in school. It would have been selfish of me to want to spend extra money on items that were a hobby for me. I waited until I got it at a price I could afford or went without it.
I personally own enough gear to equip a dive shop. I have over 70 tanks, tubs full of regs and a dozen BC's from horse collar Fenzy to the latest tech BP/ Wing gear. I have surprisingly little money in gear and dive very inexpensively as I have had great luck getting deals at yard sales, been give a lot of gear including a Bauer compressor . Occasionally a buddy will get interested in diving but are worried about the cost. I have set them up with quality second-hand gear like Conshelfs, two tanks, and mask, fins and snorkel and weights and get them some basic set up for 300-350 bucks. I let them get their own wet suits and booties but you don't have to drop thousands to dive.
Obviously I am not making a dive shop wealthy. But what I have done is steer people to a dive shop or two that I think are run by good folks who are honest and I tell them to avoid others that tend to take advantage of inexperienced divers. I did spend a lot of state money with the dive team I was on dealing with dive shops that were squared away.
Obviously most divers are not like me and you who are diving independently and working on their own gear, Most divers never dive on their own and depend on going diving on charters and with clubs or with a dive master. I have been asked to give talks to dive clubs on conducting underwater investigations. I learned from talking to divers in clubs that they only dive in groups and it would never occur to any of them to drive past a body of water and just think "Man, that place looks cool...I wonder what is in there?" and then grab their gear and dive it.
If they aren't paying for a trip, they just don't dive. I gave a talk to once to a LDS sponsored club and afterwards the shop owner began pitching dive trips. If you won the lottery you could afford to go dive the Galapagos on a live-aboard. There were about six trips being sold, the cheapest was to Crystal River to do a manatee dive. Cost for that was $500. Last time I dove Crystal River I rented a johnboat from the Best Western Hotel for 18 bucks and dove with those stupid manatees until I was so sick of them I wanted to stab one with my Vulcan.
The owner kept pressuring the divers to buy trips and I thought I was at an Amway sales pitch. He went around the room asking people what trips they wanted and I turned down each one of the great opportunities I was offered.
He finally tried shaming me by saying "You do dive don't you?" When I told him I did plenty of diving he asked,
"Well, then what kind of diving do you do?" I said,
"Free diving."
"I thought you scuba dived."
"I do scuba dive. I just do my scuba diving for free! "
That shop did not stay in business very long. Many shops find it hard to compete with the internet. In addition so much used gear has become available and back in the day before there were a lot of divers if you found used gear it retained a lot of the value and never became obsolete.
There will always be the need for dive shops but only for those who do not own a compressor or have a PayPal account. The good shops will evolve and survive.