If these investments of yours were as much of a sure bet (or adequately sure bet) as you're suggesting, banks would simply cut out the middle-person (i.e. the borrower) and invest in these things directly.
I think banks make their money not on interest rates but on various fees and overheads: each person getting a mortgage pays 10K (or more) to the bank right away. That is huge upfront money in addition to the interest rate.
also folks on average refinance or sell their property every 10 years meaning folks on a 30 year restart, paying new origination fees and once more the bulk of their payments are interest.
Why would they? For the longest time retail banks weren’t allowed to, and investment banks get risk free money via management and brokerage fees. All investing returns involve risk, it depends on your time horizon.
Same with late fees etc. Huge business.