People of all economic levels make smart and stupid decisions with money. If that money is spread out among many people making many decisions, then overall most people do reasonable things and we still can end up with a pretty good economy that is more resistant to bubbles.
Here is the degenerate case. Someone creates a corporation. They take $1000 from their pocket, put it in the corporate strongbox, issue 100 shares at $10 each, value the corporation at $1000, and put the shares and the key to the strongbox back in their own pocket. There is a lot of movement going on, but nothing has really changed. The corporation still doesn't do anything.
Now suppose that another investor joins in. They add $1000 to the strongbox, and take 100 shares. The value of the corporation is now $2000.
Really pile it on, now. 98 more investors each add $1000 to the strongbox and take 100 shares. The corporation is now worth a whopping $100k, with ownership split 100 ways. This is still a null entity to the larger economy.
Now let's have the corporation buy a moneymaking machine that costs $100k up front, and makes $100k per year. The investment $100k goes to the manufacturer, who now gets to spend it. The corporation hires a machine operator at $50k/year and spends $4k/year on insurance. The employee gets to spend half of what he makes with the machine. The corporation is now accumulating $46k in profit per year. The owners are sitting on ass, cashing fat checks, and the employee is dutifully sending out those checks.
That's fine. Without their pooled investment, none of them could have purchased the moneymaking machine alone. But the benefit does not come from the investment. It comes from spending money and doing actual work. Without that, you're all just building a new box to hold your money.
Now here's an alternate scenario. The person who would otherwise be the machine operator employee borrows $100k with 12 $3k quarterly coupons, and principal to be repaid after 3 years. (That's about 10.8% annual interest.) Each quarter, he makes $25k with the machine, pays a $3k coupon, spends $12k in living expenses, socks away $9k to pay off the principal, and $1k to insure the machine. After those 3 years, the operator can now spend that extra $12k/q on something other than living expenses.
Now we'll go one step further, and instead of getting that $100k from borrowing on a bond, the operator rents the machine from the manufacturer for $4k per quarter (insurance included in lease), and buys it outright after 3 years. Why would the manufacturer even consider that? Answer: he can't build the machines and operate them at the same time. The machine that builds the moneymaking machines must necessarily make more than $100k worth of machines per year, after all. If demand keeps up, the lease-to-own option could be bringing in more income than cash-and-carry sales.
So what do the investors really add, here, from the perspective of the machine operator and the manufacturer?
The best investments require healthy businesses, which require supplier production and consumer spending, which are uses of money that compete with investments. If everyone who can afford a Tesla roadster would prefer to buy Tesla stock, then the investment never pays off, because Tesla can't actually sell enough roadsters. Eventually, someone has to buy something. Buying a piece of the company that makes a thing is not the sake as buying the thing it makes. One is actually beneficial economic activity, and the other is just moving money from one pocket to another in the same pair of pants.
All those loans given out for education and housing are not spending. They are just new ways to launch money out on outward trajectories such that it will inevitably return.
Once you are rich enough that you can't conceivably spend all your money via normal living expenses, you have a choice: accumulate even more money that can't be spent, or spend it on abnormal expenses. You can use your money to get more money, or you can use it to buy things that no one else can. You can buy paper from Fannie Mae and Sallie Mae, or you can build a better electric car. You can shuffle paper, or you can eradicate malaria. You can shuffle paper, or you can give a condom to every person on Earth that does not want to get HIV today. You can shuffle paper, or you can buy the swankiest, shiniest luxury yacht ever made. You can shuffle paper, or you can overthrow the government that murdered your grandparents. You can shuffle paper, or you can make sure that your local zoo can afford a new habitat for some threatened animal to whom you feel inexplicably connected.
We get bubbles when the people with money to spare only want to invest in the things that other people are spending their money on. Those people should not be investing. They should be making things to sell, or buying them, rather than trying to make the people who are doing those things indebted to them somehow.