Hello @kullalok,
I subscribe mugurelionut answer entirely and could also add that attending these contests (more on cook-off’s than exactly long contests) also trains you in a somewhat important real life aspect that is the one of deadlines and time management… I.e. up to a point, by attending these sort of contests you can also understand that sometimes in industry, it’s not only about writing efficient and correct code but also about writing it in time, and this is especially important when you are doing a job when integrated on a larger team… If a critical part fails do be delivered by day X, then a whole project might be at stake…
On the more theoretical side of CS and more specifically when it comes to teaching algorithms, these contests often deal with very advanced algorithmic problems that can provide both insights for university assignments and even for further investigation on new CS fields and the relationship between advanced mathematics and CS…
So, these contests are extremely versatile and while they do not replace in any way, the proper and more methodic studies program of a university, they can actually provide you some tools that can help you in your future life, either as a theoretical CS, or as an IT engineer / programmer 
Best regards,
Bruno