While investing is stocks people are directly getting involved and investing in a company that they think might grow and be profitable , they are regulated by government and hence are legal ,
but if we see crypto its basically just a digital asset which are mostly unregulated due to its decentralized nature , they are accepted as legal tender in only one nation and most of the countries are observing and are confused between the legality of crypto , plus online stock exchanging are around from 1970s with roots starting from 1600s , before cryptocurrencies , stock was the biggest profit making asset.
plus stock being legal might be the major reason behind your query.