As has been said, school teaches you plenty of “useless” things… but these are not useless things when it comes to passing tests, which is a very useful thing to be able to do in terms of your future.
I would like to ask why you hate school so much. I hated it vehemently, but it was because I had ADHD and couldn’t concentrate on anything that didn’t interest me. Diagnosing that when I was a kid would have been life changing, but alas no one thought to look into it. If you’re so bored and unable to concentrate that you’re basically climbing up the walls during class time, and your teachers always moan about how you don’t pay attention, looking into why would be a very good idea.
Then on the other hand - some people also hate school because they’re too good at it, and they’re bored because it’s easy. If that’s the case for you, a bit of Japanese study in class time won’t kill you, as long as it’s not so zealous. You need your Japanese curriculum to be loose enough that you can drop it and pay attention whenever something important or potentially difficult is being taught at school.
In any case, just remember, this life makes it easy to throw your “future” away at an age where you are entirely developmentally unqualified to understand the repercussions of that decision. Even if your chosen future requires no qualifications, remember that your mind can change a hundred times between now and then. I once wanted to be a game designer. I became a graphic designer instead. Now I’m trying to become a doctor.
It’s always better to keep your options open, than to slam shut doors early and regret it later.