Because Bitcoin has been around for a period of ten solid years or more is not the main reason investors are investing in it, because as far as I know, their are some alt coin that has also been around for that long in the market, but none are doing very well like Bitcoin, so it's not about longevity, but more about if it is worth investing in.
Investing in Bitcoin is also risky, but it is nowhere near as risky as investing in alt coin that falls more than they rise.
Most of the old altcoins are just like existing in crypto sphere. But it doesn't mean that they have investors. Classic example is Litecoin or even Ethereum Classic.
As for the risk, yes Bitcoin is risky, but there are more altcoins and shitcoins and memecoins that are more riskier. And it's like that you are going to make a good sleep as there will be times that when you are sleeping, suddenly the coins will go down.
One example recently is Apecoin, and with the hacks on their minting, the price really went down hard. I haven't check though if it has recovered.