Huh? No! They are taking risks with YOUR money. When they lend on a mortgage, or make a corporate loan to a business they're doing that with YOUR deposits. This is how a savings account pays interest. They take your money, lend it at some interest rate and pay you a slightly lesser one. If the bank goes bust it's YOUR money which is lost: and this is why in most countries there are Federal Deposit Guarantees (i.e the govt will cover you up to some level if a retail bank goes bust)
Ironically this is precisely the OPPOSITE of the IB business model. They are NOT taking risks with your money: they fund in the money and debt markets, i.e they borrow the money to fund their activities.
When I buy stock in, say, Google or General Motors, whose money are they taking risks with? I didn't tell Google that I wanted them to put money into Uber, nor do I think it's a great idea. Too bad for me I guess.
And what do you mean "they pay for it"? Do you think when Joe Public defaults on his mortgage it comes out of the broker's bonus? No, the default risk is priced into every transaction the bank does. You and I and every other shareholder or bondholder pay for it.
Investing is investing.
They are different things. Retail banks take risks with their money (if a lend doesn't pay off, they are the ones that pay for it), IBs take risks with other people's money.
In principle, there is nothing wrong with that, but IBs get money when they get positive returns for your investment, but don't suffer when the return is negative.
That, again, is not a problem by itself, but it's an incentive for the IBs to assume the highest risks they can find around. And if left unchecked, they do become casinos.