Nobody has covered what needs to be questioned.
The answer is completely based on your appetite for risk, balanced with your experience investing. Your age, your existing investments, your retirement expectations, etc.
You could finance the house, invest the money, and lose it all (or a big chunk)
You could finance the house, and stick the money in a sock drawer, and be paying 4-5% on a mortgage in interest. However, you'd have cash for any big emergencies or opportunities. Or you might blow it.
You could pay cash for the house, and keep living like you are, rent free, but having to pay property taxes, insurance, and repairs.
There are NO investments with no loss of principal risk, that pay more than a mortgage, TODAY. (doesn't mean it will always be this way, but looks to be this way for the foreseeable near future)
In some of these plans - you sleep good at night because you have lots of cash to cover any major life emergencies (such extended job loss/loss of income)
Some people don't sleep well until their mortgage is paid off.
Some people don't sleep well unless they know they have a good retirement portfolio working for them.
If you pay off your home, and don't buy more than you should - you can take that money you were paying in rent and built a nice nest egg over the years. Just depends on who you are, and what kind of discipline you have, and goals you set.