It sounds like you’ve got a bright future ahead of you. I’m afraid I can’t answer your question from the perspective of a mathematician or computer scientist, but I can answer it as a teacher and a former student now working. Education is built to give us a broad base of knowledge. In some cases, it is broader than we need it to be; you might find that there is some formula or concept, that you agonized over memorizing, that you never really need again. In some cases, it is narrower than what we need; you may find that you have more to learn once you start your career. There are so many people, so many jobs, and so many different circumstances that I don’t believe it is possible to perfectly educate everyone with exactly 100% of the knowledge they need and no more. However, what your education does is give you a fantastic foundation and framework on which to build.
You won’t know exactly what you’re building until you’ve built it - we can’t predict the future - but you will find that as you’re building, you will be able to reach into the toolkit of your school knowledge and use what is there. Sometimes a random technique or fact that you thought you’d never need, really comes in handy. For example, in the course of getting my degree in education, I had to take a class on students with non-standard needs. The professor made sure, amongst many other things, that we knew what to do if a student had a seizure. I don’t work in special education now, and I certainly am not cut out to go into the medical field, but about 4 years ago, a teacher at the international language school I was working at had a seizure during his class. When a very worried colleague came into my office to let me know what was happening, that training from college kicked in, and I knew exactly what to do. While it may not be an emergency situation like that, chances are that you will find yourself drawing on much of your school knowledge as you move throughout your career.
And, if you ever do invent a time machine that allows you to see exactly what the future holds, make sure to share it with the rest of us!
Best wishes :)