So say you put money into an index fund, but something unexpected happens. If you need to liquidate your savings while being a student, the government will slap your fingers for trying to think long-term.
Either way, I admit this only affects the poor -- if you are a bit better off you should be able to afford to incorporate an LLC for 2500€ (half a year rent where I live). By making yourself the sole owner of the company, you can get around all these problems, as juridically the LLC is a separate entity from you doing all the trading. This kind of setting is legal, but practically off limits for many.
Government aid for students is also practically unconditional in Finland and usually covers your rent and then some, basically making your own life instantly ramen profitable. This sounds utopistic to many, and it certainly is, but I think so much potential is lost by the government discouraging young people to take risks on their own.