Ok, good question. I will give you THE answer. Right off the bat, you are correct, NO, I would not borrow money to do this.
My advice is always along the lines of people following the minimum principles and doing so in the order in which they are to be done.
1) Pay off all debt except for a mortgage and a LARGE student loan. Do this quickly.
2) Invest 15% MINIMUM into retirement accounts made up of diversified mutual funds.
3) Pay off student loan.
4) Pay off house.
5) Add more to retirement accounts, OR you can now buy individual stocks if you want if you buy no fewer than 5 and have them all ~equally dispersed into different sectors. OR you can now spend money more freely, give some more to charity, to children, etc.
So, given the above, let's say you are done with step 3, you are currently putting in 15% or even 20% of your income into the market, you have paid off your large student loan and now you are throwing money at the house. If the market tanks like it did in 2008, it is now a good time to put extra money into the market. Suspend throwing money at the mortgage to do so...yes, curb some of your spending if you want to do so. Sell some unwanted things to do so if you want. If you have unexpected income during this time throw that in (larger than expected tax refund, a bonus at work, small inheritance, someone who owes you money you never thought you'd see but now you do, etc.). Also, you COULD be a person who operates with a 3 month Emergency Fund in cash, and when that fund gets higher than 3 months, you spend it...maybe for a trip you want to take, whatever. Time to take that overflow over the 3 month limit and put it in the market. Finally, as long as you are putting 15% minimum into the market and have either gotten rid of ALL loans or are actively getting rid of all loans including your mortgage, I don't mind too much if there is a big cash buildup in an account somewhere even above and beyond the typical emergency fund level. Yes, that's not the most efficient thing to do with money, but the WEALTH building comes from getting rid of ALL debt and invested 15% MINIMUM into retirement accounts. SO, if you for some reason end up with more money than you planned to have in CASH, if the market tanks, it's a good time to put that into the market. Even the most organized of us could let a cash reserve get too big if unwatched. Might seem silly to say, but once you have ZERO debt and kids aren't living at home anymore (as is the case with me), and you've got two professional incomes, it's EASY to be sitting on extra cash. Yes, I realize that is not the case for most people.
Just as an aside, what happens if you retire with a very good retirement account AND a lot of money in a checking account? Well, you COULD live off the money in the checking account for a while (years perhaps), allowing your money in stocks to sit there and grow while at the same time not paying any income tax. This strategy also lowers potential health insurance payments. So, a boat load of cash isn't necessarily a bad thing.
Hope that helps.